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
Bug Fix: A bug where images load slowly when accessing pages with many images. (in remote server. eg, aws) #2636
Conversation
Fix Bug, call getbatch multiple times
Add test log
|
Hey @asynclee, thanks for opening this PR 🙌 |
Hey @asynclee, could you please also update the |
Hello @roubkar. Sure. I'll update that. |
Hello, @roubkar. I wrote it based on what was written before, but I'm not sure if it's correct. Can you review it, please? |
For now, I'm not sure whether this will be released with v3.17.3 or v3.18.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hey @asynclee, I just merged this PR. |
About #2424 issue.
Bug summary
Bug where images load slowly when accessing pages with many images. Additionally, when the loading is slow, the backend does not receive any additional requests, which causes slow access as well.
Why the bug is not detected in the local environment ?
In the local environment, the speed of reading images was so fast that the issue did not cause any bottleneck. However, in a remote environment, such as an EC2+EBS environment, the disk response speed is not as fast as a local disk, so the logic related to loading images can cause a bottleneck. This results in the issue where the backend does not receive additional requests when the loading is slow, leading to slow access.
What part is the problem ?
In the existing logic, when receiving image uri arrays through the getbatch logic, the uri array is initialized after the loading is completed. In other words, for example,
Assume that 50 image uri arrays are being processed,
While processing the above images, if 20 uri array requests come in, a getbatch operation requesting 70 uri arrays including the 20 uri arrays additionally requested on the existing 50 uri array being processed is performed.
If this process is repeated, many duplicated images will be requested.
How was it changed?
Changed the logic to additionally manage the uri arrays that are being processed/processed, and to avoid processing duplicate image uris that are already being processed.