-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Media Viewer] Performance on clicks is slow #179
Comments
- Respect index configuration change on media table - Use alternate query when media is not filtered based on address to avoid expensive address join for orgs with lot of address levels
We have satisfied the AC requirements except for writing gatling tests.. Not sure how we would do that as well. |
|
@AchalaBelokar reported issue is same as prod behaviour and not part of the AC of this card. |
@1t5j0y still it seems to be slow as before, also page 1 call is going for page 0 itself. And clicking on an image also renders it very slowly, not sure if there was some issue in deployment. |
Bug was introduced into ETL where new indexes are created for the same columns on media table on each run. 56 orgs currently have 100+ indexes on the corresponding 'media' tables. Query to check impact:
Steps for tech QA
These steps will be repeated on prod for all affected orgs after QA pass and deployment of fix. |
@1t5j0y forgot to add the screen recording(took yesterday) for the issue I noticed. Adding for reference to help the QA as well: https://drive.google.com/file/d/1w5q-OCYu8z-BVPIAhnLN-v6EL5NNXfOS/view?usp=drive_link |
Testing resultsValidated that the fix works as expected, without creating duplicates. SQL to bulk drop all the indexes from media table and index_metadata(media) are as follows, the next etl run should only create 1 set of required indexesselect 'drop index "' || tm.schema_name|| '"."' || im.name || '";' from public.index_metadata im
join table_metadata tm on im.table_metadata_id = tm.id
where tm.name = 'media';
delete from index_metadata where table_metadata_id = (select id from table_metadata where name = 'media');
|
and query performance is now much better. Additionally, optimised resource fetching from media client. |
|
Please note that i have configured prerelease ETL to use a different DB than prerelease avni server, to test the postgres upgradation.. To unblock your testing, we can revert the above change. |
@himeshr yeah releasing 10.1.1 cards are higher priority, so we can do the needful asap to unblock the testing since it will help in testing fixes for 3 tickets. |
@himeshr has already reverted the change. ETL for gvamp_uat is failing on prerelease.
Have asked @AchalaBelokar to test with another org. |
@1t5j0y we have created the work order and the uuid is '42680a41-c290-481c-9f58-a9946c74c9b6' we can able to see the data in DB but not in ETL table so the image we have added is not reflecting in the media viewer |
QA Reference : |
I still find the media search is slow when loading the first page(taking 36 secs). Few days back it was faster. Few reasons I see:
|
@mahalakshme doesn't look like the fix has been deployed to prod. https://app.circleci.com/pipelines/github/avniproject/avni-media?branch=10.1 |
@1t5j0y looks like got missed - I thought as part of the fix for duplicate indices creation it was deployed so didnt add it to 10.1.1 card. Can you deploy it - add tags, update release notes and merge as needed as part of this card itself since release 10.1.1 is also done. |
deployed the changes - did tagging and merging - now testing |
@1t5j0y fetching a page still takes 15-20 secs. Can anymore performance improvement can be made? |
Seeing better performance (1-2s) again after running Unsure of why this is making such a big difference as auto vacuum seems to be occurring regularly. Not making any further changes on this card as we already have avniproject/avni-etl#114 |
https://avni.freshdesk.com/a/tickets/4775
Issue:
On clicking MediaViewer and on clicking a image - take around 1 min to load.
Some users feel this used to take only around 5 seconds before
AC:
The below actions(basically any action in Media Viewer) should not take more than 5 secs to load
Technical suggestions:
The text was updated successfully, but these errors were encountered: