Flashcard Import Halts

Shun

状元
Hello Mike,

I was trying to import sentence flashcards without pinyin and fill in the pinyin with Pleco, but the import would halt completely at 25,200 cards, the second time at 3,400 cards. Do you have an idea what this could be due to? I didn’t have too many dictionaries active with the “Use in dictionary” option.

It’s on an aging iPad, might a complete delete and reinstall of Pleco help?

Many thanks,

Shun
 

Shun

状元
Probably a database sync or auto-compact - does it resume after a few seconds?

Thanks, but unfortunately it doesn't resume, not after 30 seconds or more. I tried it with an empty flashcard database afterwards, and it would still halt for at least 30 seconds before I would cancel it (then for maybe 10 seconds, Pleco was frozen before the responsiveness returned). I guess that's a tricky one. Perhaps I could send you my Pleco settings file?

Edit: Strangely enough, what it started importing wasn’t visible after the canceled import, either.
 
Last edited:

mikelove

皇帝
Staff member
Probably something in the import file rather than your Pleco settings; if you break it up into multiple smaller files, does it still halt at about the same place in the overall list? (Suggesting it’s a specific entry rather than a specific # of entries?)
 

Shun

状元
Thanks a lot for your help, I think I've now figured it out. I've noticed that it also generated Cantonese pronunciations on the iPad, which I don't need in this case. With "Show Cantonese" disabled in the settings, it has gotten much more reliable. It would still pause intermittently, but then resume. 44,000 cards now imported fine. That was quite likely the cause.

@mikelove: Then this would be a small bug report: Large lists with long sentences can make the import process stop when Cantonese pronunciation is filled in automatically. (or it could always be a combination with yet another setting) I'm leaving the import file attached if you're going to try to reproduce it.
 

Attachments

  • sentences_cmn_eng_simp.txt
    3 MB · Views: 445
Last edited:

pdwalker

状元
I just tried importing into my ipad pro without changing any settings from whatever I had them sent to. I had a pause at 25K, but then it continued. The import was successful.

my import settings:
definition source: prefer dicts
store in user dict: no
fill in missing fields: yes
missing entries: skip
ambiguous entries: use first
duplicate entries: merge cats

a total of 41480 cards were created from the source of 43903 entries.

I will now do the same import, and allow duplicates
 

pdwalker

状元
a pause at 3.6K and I didn't previously compact any databases after undoing the last import

17 minutes in and it has not progressed any further. will cancel and try again.

[edit]: cannot cancel. the cancel y/n prompt comes up, but then nothing happens afterwards. I've had to force quit the application. once I restarted the application, I was able to undo the import of the # of entries that had been pulled in, which was 1 less than the number that showed on the hung import.
 
Last edited:

pdwalker

状元
2nd import. I noticed little brief pauses during the import, including the number where it hung last time. It got to 3687 this time and hung again. Restarting, undoing import and testing again.

3rd import: changed definition source to file only and still allowing duplicates. - also hung at 3666.

A thought: the entries it seems to be hanging on seem to have very long Chinese sentences. Could there be some problem with trying to import long entries and allowing duplicates?

4th import: skip duplicates: pause at 3651 and then it continued and completed successfully, but this time showing 41521 entries. weird.
 
Last edited:

Shun

状元
a pause at 3.6K and I didn't previously compact any databases after undoing the last import

17 minutes in and it has not progressed any further. will cancel and try again.

[edit]: cannot cancel. the cancel y/n prompt comes up, but then nothing happens afterwards. I've had to force quit the application. once I restarted the application, I was able to undo the import of the # of entries that had been pulled in, which was 1 less than the number that showed on the hung import.

Thanks a lot for reproducing it. That’s exactly what had happened to me. Even the numbers match. The input list seems fine, except that the sentences can be long. So I assume you also have “Show Cantonese” enabled. If you disable it and keep Duplicates set to Allow, the problem should go away, as well.

I could have folded the duplicate sentences first to avoid duplicates when importing, but the order of my script was to fold them only afterwards. I can change it, but it should work both ways.
 
Last edited:

pdwalker

状元
Good news! (5th import) reproducible with a smaller data set. I took the largest 101 lines from the file and tried importing them. Solid hang at line 100, the 99th entry - which is also one of the lines that hung in the earlier import (3688). Rather, the 99th entry imports and the 100th fails to progress.

Just did it again, and this time the hang is at 98. (6th import)

Yes, I have show Cantonese enabled.

There does seem to be some kind of subtle bug here.

(7th import, show cantonese turned off) another hang, also at 98.

Good luck finding the problem!
 

Attachments

  • out.txt
    46.5 KB · Views: 264

Shun

状元
Great, that seems like a pretty thorny issue! Funny that it also hung with Show Cantonese turned off. In any case, I'm thankful that it worked once now. Pleco 4 quite certainly won't have this, with its new architecture.
 
Last edited:

mikelove

皇帝
Staff member
We'll see if we can figure out with a sensible / fixable reason for this for our next bug fix update. But yes, should not be an issue in 4.0. (on which a 25k example database should only take a minute or two to import anyway)
 
Top