You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have noticed that APIM 4.1.0 execute more queries to load thumbnail and rating compared to APIM 3.2.0
Solution
In the analysis, We found that the amount of queries can be reduced by
Avoid redundant permission checks for registry resources
APIM will do the following when loading thumbnail and rating.
We’ll load lightweight info of API
In the code flow, We’ll get the registry
After that, We’ll load tenant specific API RXT file
In the method loadloadTenantAPIRXT , we’ll load the RXT file from the filesystem and try to check its existence in the Gov Registry. Regardless of if it exists or not, We’ll add Authorize role (set read access to anonymous role)
JDBCAuthorizationManager will be used to add access to anonymous role for registry resource
JDBCAuthorizationManager will load the permissions for the given resource first and add permission if it does not exist. (SELECT UM_ID FROM UM_PERMISSION WHERE UM_RESOURCE_ID='/_system/governance/repository/components/org.wso2.carbon.governance/types/api.rxt' AND UM_ACTION='http://www.wso2.org/projects/registry/actions/get' AND UM_TENANT_ID='-1234'
)
APIM would do the same for the below resources "provider.rxt", "api.rxt", "productdocument.rxt.", "documentation.rxt.", "product.rxt"
Further, loading thumbnail and rating requests will be initiated by user's visit (https://localhost:9443/devportal/apis) after authentication. For each and every APIs, separate requests to load rating and thumbnail will be sent to the backend.
For resource path not found scenario, db is queried every time. To improve the performance, this 'not-found' state for the provided path is cached.
Affected Component
APIM
Version
4.1.0
Implementation
No response
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered:
Problem
We have noticed that APIM 4.1.0 execute more queries to load thumbnail and rating compared to APIM 3.2.0
Solution
In the analysis, We found that the amount of queries can be reduced by
Avoid redundant permission checks for registry resources
For resource path not found scenario, db is queried every time. To improve the performance, this 'not-found' state for the provided path is cached.
Affected Component
APIM
Version
4.1.0
Implementation
No response
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered: