Pleco unresponsive while AnkiDroid deck is being imported

kitune

Member
I was having trouble finding an Android-specific bug report thread; let me know if this isn't the right place.

If Pleco uses AnkiDroid for its flashcard system, importing any large deck to AnkiDroid will cause Pleco to be completely unresponsive for the entire duration of the importing process.

This wouldn't usually be a problem in day-to-day use, but since the AnkiDroid importing process is very slow - probably half an hour to import a 80MB deck? - it's quite inconvenient not to be able to use Pleco for such a long span of time.

Reproduction steps:
- In Pleco, Settings -> Flashcard System -> select "AnkiDroid"
- In AnkiDroid, import a large deck. I tested it with this deck which is 80MB but I think a deck 1/4 the size should give similar results
- Try to open Pleco

Pleco version: 3.2.82 Android
AnkiDroid version: 2.15.2 (latest)
Device: Samsung S10e

Screenshot_20210529-114937_AnkiDroid.png Screenshot_20210529-115004_Pleco.png
 

mikelove

皇帝
Staff member
Maybe disconnect Pleco from AnkiDroid or disable duplicate checking during that import?

My guess is that they’re temporarily deleting their database indexes during the import, which is a sensible enough thing to do performance wise but makes duplicate checking extremely slow. (Either that or they’re locking them entirely)

It would probably be better if they updated things on their end to have all API calls instantly fail while an import is in progress, but I’m not sure how what we could do to detect an active import on our end.
 

kitune

Member
Ah, changing the flashcard system Pleco uses to the built-in one - before importing the deck into AnkiDroid - does work as an okay workaround. The order in which I do this would be important though, since I can't change Pleco's settings while Pleco is frozen, and AnkiDroid's "Importing deck" modal is understandably not exitable for the entire importing process.

I've checked online and in the AnkiDroid settings, and I'm not sure what setting controls the duplicate checking - is this an Anki feature specific to a certain platform?
 

mikelove

皇帝
Staff member
Duplicate checking is configured in Pleco - if you disable that then Pleco should have no reason to access the AnkiDroid API except when you're creating a card, and so should not be affected by an AnkiDroid import.
 

kitune

Member
Thank you for clarifying :)

It's a bit of a bummer that there isn't an ideal solution that allows automatically suspending use of the AnkiDroid API while an import is happening, but I understand there isn't really a good way to do that.
 
Top