[BUG]: Next card takes 2 seconds to load
Checked for duplicates?
- [X] This issue is not a duplicate
Does it also happen in the desktop version?
- [X] This bug does not occur in the latest version of Anki
What are the steps to reproduce this bug?
Hit any button at the bottom of a card to trigger loading the next one
Expected behaviour
I expect the next card to load within 500 ms in 99% of cases
Actual behaviour
~10% of the cards load with 1-10 second delay
Debug info
AnkiDroid Version = 2.19alpha12-debug (2aa20401738d695c3a805566a70cc43f8f9bef8c)
Backend Version = 0.1.40-anki24.06.3 (24.06.3 d678e39350a2d243242a69f4e22f5192b04398f2)
Android Version = 13 (SDK 33)
ProductFlavor = amazon
Manufacturer = Fairphone
Model = FP4
Hardware = qcom
Webview User Agent = Mozilla/5.0 (Linux; Android 13; FP4 Build/TKQ1.230127.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.103 Mobile Safari/537.36
ACRA UUID = 0f97f5cb-50d1-4ac6-bbeb-97086cffd3b8
FSRS Enabled = false
Crash Reports Enabled = false
(Optional) Anything else you want to share?
I have ~1000 of text-only cards, with a single anchor html tag in the template. <a href="...">{front}</a>
This happens for me on the released version (2.18.4).
I first tried to "check the database", but it didn't resolve the issue.
I profiled the latest main version (https://github.com/ankidroid/Anki-Android/commit/2aa20401738d695c3a805566a70cc43f8f9bef8c) on my phone and it had the same issue. I found out that something in rsdroid.so might me the culprit, aswerCard regularly takes over 300 ms and in one occasion over 2 seconds to complete
I'll spend some time to figure out how difficult it is to get the stack trace of the native part
Research
- [X] I am reporting a bug specific to AnkiDroid (Android app)
- [X] I have checked the manual and the FAQ and could not find a solution to my issue
- [ ] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing
It is also caused by scripts/large fonts etc.
Indeed, I had a single html tag in the answer card and removing it dropped the new card appearing time to hundreds of milliseconds, I'd like to have the tag in the template, so I'll continue debugging what is taking so long
I think I was told that the new reviewer in dev options can possibly fix most of such problems.
This seems like an issue with your template. Try asking for help in the forums.