Vocab-Apps / anki-language-tools

Anki Language Tools addon
GNU General Public License v3.0
6 stars 0 forks source link

Voice Selection: freezing when switching to other lanagues #6

Closed mrderiuzz closed 3 years ago

mrderiuzz commented 3 years ago

image it takes a good moment when switching languages in Audio Selection view. If you click anything on that window when it's loading it's gonna break, like become all white and stuff.

can we get some kind of loading animation here, or anything? also blocking the window from being clicked on would help

luc-vocab commented 3 years ago

Are your images in separate fields ? They should obviously be ignored by language tools. If you map those fields to "unset" in the language mapping, then those images shouldn't show up when you select "Czech" language.

mrderiuzz commented 3 years ago

Images are in separate fields - can we double-check if in a field there's only image it would map to not set?

On Fri, Jan 29, 2021, 11:52 LucW notifications@github.com wrote:

Are your images in separate fields ? They should obviously be ignored by language tools. If you map those fields to "unset" in the language mapping, then those images shouldn't show up when you select "Czech" language.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucwastiaux/anki-language-tools/issues/6#issuecomment-769731919, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF25NMEG5GUBYEO2WVMPMXTS4KHO5ANCNFSM4WVZGTPA .

luc-vocab commented 3 years ago

So the interesting thing that happened is that one of your "image" fields was detected as Czech language. If I mark the language manually to "Not set" for that field, the images stop appearing. That dialog was never intended to show images, I guess the automatic HTML processing in the labels is doing that. I think I can try to ignore those fields in the detection.

How long do you experience the freeze for ? I just checked with your german deck, and the freeze when switching languages is just 1 second.

Do yourself a favor and mark those image fields as "Not set" for now, it'll make everything smoother

mrderiuzz commented 3 years ago

yeah I will remap my decks but just waiting for some resolution to #3, hopefully collapsing the decks as I only need to map languages in my language decks, which is just 2 (no need to do for others)

luc-vocab commented 3 years ago

I released a change to language detection which should ignore sound and image fields. It should also not display images in the voic selection screen.

@mrderiuzz how long is the pause when you switch languages ?

luc-vocab commented 3 years ago

I finally experienced this, after importing a french deck with 50k notes. So this requires a large number of notes to manifest itself. It's due to the search for non-empty fields within those notes. I think I know how to make it faster.

luc-vocab commented 3 years ago

should be fixed in 2.4