First Impressions

Shun

状元
Positives:
  • I love how all flashcard categories and subcategories now display the number of cards they contain.
  • A very clean, clear, professional-looking, matter-of-fact interface.

Negatives:
  • The dictionary Search screen is a bit sluggish on an iPhone Xr. Both searching and displaying of entries take longer. But this speed difference is more than made up for by all the new features.
 

mikelove

皇帝
Staff member
Thanks!

The slowness there is unexpected, we've benchmarked it faster than the old one + it's screaming fast on test devices here, even with a huge complement of dictionaries. Will have to see if we can reproduce this with your data/settings.
 

mikelove

皇帝
Staff member
If you go into Settings / Manage Dictionaries / Flashcards and turn on 'exclude from search', does that help with the performance problem? If not, what about if you also turn off a few of your other user dictionaries?

(a change in 4.0 is that we now search flashcards along with other dictionaries, and since your flashcard database is extremely large it may be that you're pushing up against some performance bottlenecks we hadn't anticipated)
 

Shun

状元
If you go into Settings / Manage Dictionaries / Flashcards and turn on 'exclude from search', does that help with the performance problem? If not, what about if you also turn off a few of your other user dictionaries?

Yes, if I exclude flashcards from search, the search happens much faster. But opening a large dictionary entry with all of my maybe 30-40 dictionaries, then still takes 1-2 seconds on the iPhone Xr.

(a change in 4.0 is that we now search flashcards along with other dictionaries, and since your flashcard database is extremely large it may be that you're pushing up against some performance bottlenecks we hadn't anticipated)

That will definitely be it. I will check if it's possible to exclude only some of my flashcard categories from Search, especially the sentence flashcards. I should redo these to take advantage of Pleco 4.0's new, more flexible flashcards fields.
 

mikelove

皇帝
Staff member
Yes, if you reclassify the sentence ones as sentences (batch operation change the card type to Chinese Example) that will keep them out of dictionary searches and probably speed up the definition screen too, and as an added bonus they’ll show up in Examples.
 

Shun

状元
I couldn't find the "Chinese example" card type. (solved now)
 
Last edited:

mikelove

皇帝
Staff member
Hmm, sorry, it seems like 'set card type' was mis-flagged as an expert option and hidden from the main 'batch' screen.

Edit, Batch, Operation -> custom, tap on the (i) button, action -> set card type, card type-> Chinese example, then go back to the top batch screen and set some "preview # cards" to make sure that it's actually going to do that before you run the operation. (you can also check the 'back up before running' switch to be extra safe)
 

Shun

状元
Thanks! It crashed when I asked it for a preview of the first 50. I submitted a crash report.
 

Shun

状元
I ran it without a preview, and it processed the cards fine.

Dictionary definitions are already opening more quickly.
 
Last edited:

mikelove

皇帝
Staff member
Thanks!

EDIT: and seriously, your databases have been a *huge* help in optimizing stuff; there were bugs I don't know if we would have even noticed if we weren't testing with 900,000 flashcards (but which actually affected stability / performance for everyone).
 

Shun

状元
You're welcome; great to hear that! I read that it was just some sort of a switch in the database engine that you found right away. :)
 

mikelove

皇帝
Staff member
That was a big part of it, but there were some other places where things were weirdly slow or memory-wasting too.
 

Shun

状元
I see! I'm not a big programmer, but what I heard Avie Tevanian say in an interview impressed me: He said many programmers often neglect to really stress-test their own code. (perhaps because they subconsciously want to see their code working, not failing) He advised programmers to write testing code that does the worst, most demanding things to their own libraries.

So we'll continue stress-testing Pleco.
 
Last edited:

mikelove

皇帝
Staff member
We do generally make a point of stress-testing code, it's just that we though 'stressful' was 100,000 flashcards rather than an order of magnitude more than that :)
 

Shun

状元
:) I wonder if Pleco would now be able to handle a flashcard database of 9 million cards. I'm guessing not, because of memory constraints. One million is probably enough to find any inefficient parts. Congratulations again.
 
Last edited:

mikelove

皇帝
Staff member
We could optimize it to do that, but at that point we'd have to significantly compromise performance for smaller databases to get it to scale; there are always tradeoffs. (with 1M entries we can get by without actually optimizing for that many - it's just slower than it would be if we did - but with 9M we would run out of wiggle room there)
 
Top