Faced issue after updating to 24.x version (don’t remember exact value), but “temporary ignored”.
Decided to upgrade to latest version and give it a try (24.11) – still reproducible.
Main issue: can’t import “large” (160Mb) apkg decks into existing (large? 250k total cards) profile
stuck at “Checked…” where counter just continues to increment (~350k is max number I waited before giving up)
How can I collect more logs (or some other auxiliary data) to troubleshoot better root cause of this issue?
Any suggestions?
Thanks
clarification: WaniKani is not the only deck I’m not able to import; tried on 4-5 diff decks; the one thing they seem to have in common is size (or media associated with notes)
That it is happening on the basis of the size of the deck makes me suspect that Anki is not able to fully “unpack” the deck in the space allowed. Although, that would mean that your new profile is allowed more space to unpack the apkg, and suggest that your profile folders are limited in size in some way [which they wouldn’t ordinarily be].
To work on the space issue – when was the last time you ran Check Media and deleted your unused media (and emptied your media trash)? Running a Check Database might be good too.
If that doesn’t help, since you do have a place you can import it, try this –
Import the deck into a new profile.
Export the deck from there without media.
Import that new apkg into your main profile.
Copy the contents of the new profile’s collection.media folder into your main profile’s collection.media folder. Managing Files - Anki Manual
also performed “Check Database” and restarted Anki
still – stuck at infinite “Checked…” counter on Import collection that contains media
based on above, I suspect that it’s not folder size issue (or number of items in folder)
also failed to google any possible reason / limit (custom disk quota can be set per disk or profile, but have “unlimit” for both)
Dae, due to profile size (and because there is no necessity) I don’t use synchronization.
my profile is behind email address: vehpsrr@gmail.com
but it’s empty:
I’ll need to be able to reproduce the issue to look into it. Could you export your collection without media, and message me a private link to it please?
Are you saying that importing top.apkg into a new profile, and then the shared deck mentioned above, does not cause the problem to happen? I need steps that will cause the problem to happen. What happens if you export a colpkg and import it into a new profile instead?
same with “colpkg” format export (if media is excluded) – able to import into new profile and import other decks
I suspect that media is culprit for this issue (system/environment configs, “collection.media” folder configs, files itself, etc)
regarding media: it doesn’t work as expected only for import operation
if I add/edit image to new/existing note – works as expected
if I export this deck (with single note that contains image); remove from profile; try to re-import – stuck on infinite “Checked…”
(for my large/main profile; works on empty profile)
I guess, next logical step would be to export “colpkg” with media included and try to Import into new profile, but that sounds painful (archive size I expect ~20Gb; import time… probably a lot)
any idea how I can collect more data about my environment that might help?
It might be worth trying to figure out if the presence of media is the problem first. Before trying this, please disable media syncing, so you don’t accidentally mark files as deleted when moving them around. They must be all back in your media folder before you sync again.
Please open your media folder and move 3/4 of the files out of it. Does the importing still fail? What if you try with the remaining 3/4 of the files instead? By trying a few times, are you able to narrow down the problem files(s)?
Does your computer have a SSD, or does it have a HDD?
have both, but disk C (where Anki is installed and AppData folder) is SSD
finally, have results to report
did play with partial file movement: renamed “collection.media” into “backup_collection.media”; created empty “collection.media”; move some files from “backup”; try to import new deck; repeat
noticed that with each additional batch of files I get noticeable performance hit and “Checked…” counted goes up to be around number of items in folder
so when in the past I waited till 350k (because I have only 250k notes) it was not enough, because I actually have ~450k of media items
so I switched my “backup_collection.media” back to “collection.media” and just tried to wait a little bit more
and I was finally able to import deck with 2 notes (one of them has image)
downside: it did took me 17min; 99% of this time was spend on “Checked…”
also during this time was looking at resources consumption or some suspicious activity
anki:
just to conclude that it’s antivirus in the way – temporary disabled it (tried to whitelist directory, but had no affect) and imported new deck – works without issues and performance acceptable, within 1min
I can accept it as answer/solution, but:
there was no changes done to antivirus in past history (year+; unless we count autoupdates)
I saw this performance hit only after upgrade to new Anki version (previous was installed ~2.5 years ago and never updated; but can’t point to exact version)
isn’t Anki disk usage on import too high? like, it’s trying to get more info about “collection.media” content than just high-level metadata (file name, created date, etc)?; not saying that it’s trying to read files (that would be 15Gb) but it’s something specific that triggers (needless?) antivirus check
please advise how to proceed
changing issue summary to: “Import Deck issue (slow performance; stuck at Checked; antivirus) after upgrade to 24.11” to better reflect root cause
Autoupdates could cause different behavior, so that certainly must be considered. Breaking changes can be introduces by any type of update, no matter if it’s automatic or manual.
Would be good to know if the old version has the same problem with the current version of your antivirus. If so, then it’s not a new issue / not ankis issue.
Not sure, but I’d not consider less than 2MB io usage to be an issue. Especially considering you’re importing .apkg files, which might change the database and move media into your anki media folder.
Maybe you can download version 2.1.66 and check if the issue still happens with this version (according to github this version had been released approximately 2.5 years ago, like your last version)?
Make sure to backup your current Anki2 folder though, as I don’t know if the old anki version might change something in an unexpected way.
unfortunately, I can’t reliably reproduce issue with current version so will not be able to confirm that it works as expected with older release
looks like BitDefender antivirus has cache (to speed up future scans) and will not scan the same file twice
so I can only: disable antivirus; import few collections; enable antivirus; and during next import I’ll see slow “Checked …”, but counter will go starting from 450k+ (only for delta that was added during period that antivirus was disabled)
this cache is probably invalidated from-time-to-time, but I fail to find reliable way to affect it manually:
there is no way in UI to “clear cache”
tired to rename profile (will change path to file)
running “touch” on batch of files in “collection.media” folder
PC restart
had no luck
¶
I guess, if there will be more evidence in future from other users with the same problem – issue can be investigated more closely
for now, “specific environment issue” sounds like plausible resolution
thanks to everybody who helped to troubleshoot and identify root cause
as side-effect, I for sure did learn a thing or two about Anki resources management that will probably help me in future