-
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
[Bug]: How to analysis the reason of issue #5743 #3
Comments
First step: Recheck if The ReviewActivity runRandomizer() method is getting called many times is the cause of the slow peer reviews. In ReviewActivity class, runRandomizer() is called five times;
In the runRandomizer() method, it indeed triggers the API request:
Additionally, the checkWhetherFileIsUsedInWikis method also triggers another API call:
|
Check how many times these methods are called in one test Use counter
|
Through the test, the method has been called over 30 times in one test. Next step, we goona reduce the number of times these methods are called. realized by this way: |
The original issue comment: commons-app#5743 |
Summary
The overall Peer Review screen incurs a lot of delays. This is observed even on good internet connections. The peer review screen takes a few seconds in order to load the image to be currently reviewed by the user. The fix for this is important as it would help improve the usability of the feature and would make it accessible to a wider range of users.
User [sivaraam] report: The first part of this enhancement would be to identify which part contributes to the slow loading of the image in the first place.
User [nicolas-raoul] report: Peer review becomes slower and slower. After reviewing a few dozen images, it takes several minutes between each review.
After discuss, User [psh] found the reason: The ReviewActivity runRandomizer() method is getting called many times (in one test, 30+ times), and there are (at worst) a couple of hundred API calls going on until it finds the next image to review. Each API call is taking 150-250ms each.
For now the root cause has been found, We try to fix this bug to reduce delay berween peer reviews, make this process faster.
Steps to reproduce
Expected behaviour
The number of times these methods are called has been reduced, and peer review will spend only 1s.
Actual behaviour
Device name
Samsung J7
Android version
Android 10
Commons app version
3.1.1
Device logs
No response
Screen-shots
No response
Would you like to work on the issue?
Yes
The text was updated successfully, but these errors were encountered: