debanjandhar12 / logseq-anki-sync

An logseq to anki syncing plugin with superpowers - image occlusion, card direction, incremental cards, and a lot more.
GNU Affero General Public License v3.0
446 stars 30 forks source link

Could we have the option to only sync the current page or selected page avoiding the performance problem when large amount of card? #68

Closed WaytrueDeng closed 10 months ago

WaytrueDeng commented 2 years ago

Describe the solution you'd like A clear and concise description of what you want to happen. as above Describe how it will help your workflow A clear and concise description of any alternative solutions or features you've considered.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

WaytrueDeng commented 2 years ago

image

Conchilardo commented 2 years ago

Yes please this would be awesome

debanjandhar12 commented 2 years ago

I need clear idea about the need for this before I can decide.

Specifically, is the speed of sync slow? How long does it take? How many cards do you have? What type of cards do you mostly use?

Since the plugin doesn't collect any data (and there are no plans for it either), having some of you tell me this manually would be great for decision making.

Conchilardo commented 2 years ago

I have 500+ normal cards (text front side and text backside) which takes about 5 minutes to sync. It'd be awesome to be able to sync a single page at a time, or single cards

debanjandhar12 commented 2 years ago

I have 500+ normal cards (text front side and text backside) which takes about 5 minutes to sync. It'd be awesome to be able to sync a single page at a time, or single cards

What type of cards are majority of them? Multiline cards? Clozes? Replaceclozes?

Conchilardo commented 2 years ago

For me they are multi line. But I've not had a time out error like op

alan-n-f commented 2 years ago

It is quite slow. Some sort of fix would be appreciated, even what the OP proposes.

debanjandhar12 commented 2 years ago

It is quite slow. Some sort of fix would be appreciated, even what the OP proposes.

Please include the following information:

Also, if anyone else is experiencing the same, please comment the same. This will help in making decision.

alan-n-f commented 2 years ago

@debanjandhar12 Hi. Thanks for all of your work, man.

  1. Skip ... Dependency Hash option checked. I also tried checking activeCacheForLogseqAPIv0 to no avail.
  2. Linux (Manjaro + KDE)
  3. Around +40 seconds
  4. 2600+ cards

It is frustrating enough for me to switch away into making everything inside of Anki again. The time it takes is not ideal for adding a few cards at a time, stopping to make reviews, and repeating.

(Hope you fid a solution. Is it because you can't cache the files unlike with Obsidian?)

guurmi commented 1 year ago

Hi,

I would be very interested in a curent page only syncing. In my case it's not a problem of syncing time or error (well not yet). For organization reasons, I want to remove some of my notes from my Logseq file while keeping coresponding cards in Anki. But with Anki pluggin automaticallly syncing all, those cards are deleted from anki.

Maybe someone have a solution not involving massive coding ?

And a big thx to the dev, who do an amazing work!

debanjandhar12 commented 1 year ago

(Hope you fid a solution. Is it because you can't cache the files unlike with Obsidian?)

Mainly because:


One solution to the problem could be maintaining the hashes based on changes on it's dependency (dependency are blocks/pages). This will allow almost instantaneous sync after syncing for first time on opening logseq. However, logseq often changes things around those parts. Also, this may be hard to maintain (this may not be true if there is some lib to handle this - is there?).


The other solution is what the issue suggests. This will require massive changes in the current architecture. I will look into this at a later time.

hedyhli commented 1 year ago

I'd like to bump this. For me I only wish to sync cards from specific pages to Anki so would love for this feature to be implemented!

debanjandhar12 commented 1 year ago

I am considering revisiting this issue once more. Based on my understanding, the motive behind this feature request has is no longer performance but rather unique workflow requirements. Is that correct?

jenny923432 commented 1 year ago

For me the motivation is performance. I have 538 cards, mostly swift arrows and single-line #cards, and the plugin consistently saturates a CPU core for over 6 hours to sync them.

debanjandhar12 commented 11 months ago

If syncing is taking too long, please ensure that the following settings are enabled: image

debanjandhar12 commented 10 months ago

Coming later this week: image