logseq-anki-sync icon indicating copy to clipboard operation
logseq-anki-sync copied to clipboard

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

Open WaytrueDeng opened this issue 3 years ago • 11 comments

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 avatar May 13 '22 02:05 WaytrueDeng

image

WaytrueDeng avatar May 13 '22 02:05 WaytrueDeng

Yes please this would be awesome

Conchilardo avatar May 24 '22 18:05 Conchilardo

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.

debanjandhar12 avatar Jun 02 '22 15:06 debanjandhar12

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

Conchilardo avatar Jun 02 '22 16:06 Conchilardo

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?

debanjandhar12 avatar Jun 02 '22 16:06 debanjandhar12

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

Conchilardo avatar Jun 02 '22 16:06 Conchilardo

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

alan-n-f avatar Sep 10 '22 22:09 alan-n-f

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

Please include the following information:

  • Is "skip rendering on DependecyHash" checked in plugin settings?
  • OS:
  • How long does it takes?:
  • How many cards do you have?:

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

debanjandhar12 avatar Sep 11 '22 17:09 debanjandhar12

@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?)

alan-n-f avatar Sep 11 '22 20:09 alan-n-f

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!

guurmi avatar Oct 03 '22 09:10 guurmi

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

Mainly because:

  • The plugin supports block & page references and embedded. This means the plugin needs to calculate the hashes of those as well.
  • Datascript is very slow. (even simple operation of block retrival with uuid through logseq api takes a long time)
  • I dont have any experience with datascript. This means most of the datascript queries are unoptimized.

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.

debanjandhar12 avatar Oct 09 '22 07:10 debanjandhar12

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!

hedyhli avatar Aug 07 '23 09:08 hedyhli

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?

debanjandhar12 avatar Aug 07 '23 14:08 debanjandhar12

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.

jenny923432 avatar Aug 21 '23 07:08 jenny923432

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

debanjandhar12 avatar Oct 14 '23 10:10 debanjandhar12

Coming later this week: image

debanjandhar12 avatar Nov 05 '23 05:11 debanjandhar12