franciskafieh / obsidian-list-modified

🪨 The advanced and adaptive changelog for Obsidian. Links all modified files meeting certain criteria to a timed (daily, weekly, monthly) note.
MIT License
85 stars 7 forks source link

POSSIBLE BUG, NEED SOMEONE WITH LOTS OF DAILY NOTES TO TEST #50

Closed franciskafieh closed 4 months ago

franciskafieh commented 1 year ago

Not caching getAllDailyNotes may cause slow down if user has lots of daily notes.

To test, please just edit a file. Observe how long it takes to update the list of links in your daily note. Please let me know if there is/is not a slowdown, and how many daily notes you have.

etiennepellegrini commented 1 year ago

I can confirm that not caching getAllDailyNotes2 causes issues with large number of daily notes (~ 500)  2022-11-28 at 11 09 01 AM

franciskafieh commented 1 year ago

@liamcain someone is having an issue with caching. i remember in the discord you told me something about this. do you plan on releasing the new version of obsidian-daily-notes-interface anytime soon? thanks!

franciskafieh commented 1 year ago

P.S. @etiennepellegrini thanks for the detailed call tree analysis!

etiennepellegrini commented 1 year ago

Update: it seems my problem was caused by not having created today's daily note yet - seems like the plugin checks for it every few ms, and needs to list the whole directory for that...

I'd suggest increasing that interval to a few seconds!

franciskafieh commented 1 year ago

Update: it seems my problem was caused by not having created today's daily note yet - seems like the plugin checks for it every few ms, and needs to list the whole directory for that...

I'd suggest increasing that interval to a few seconds!

yes, that makes more sense. can you let me know what your interval is in your list modified settings? if it's 0, it should NOT be checking every few ms (it should only check when a file is modified)

etiennepellegrini commented 1 year ago

Ah, that's a bit counter intuitive - I set it to 30 hoping it would reduce the cadence of checks. I'll set to 0 and report back!

franciskafieh commented 1 year ago

Yeah, I'm going to change the functionality a bit. I had it working better in 2.1 and then I deleted my local copy so I have to re-do it :sob:

etiennepellegrini commented 1 year ago

That's the worst :-/ I'm still struggling with creating the habit of committing / pushing regularly (to a private remote if you don't want to publish the work in progress)

Good to know you'll work on a fix!

Also, it'd be good to mention that the write interval is in seconds! Had to find the line with writeIntervalInMs = to figure it out :-D

franciskafieh commented 1 year ago

Oh shoot, is that not in the settings description? Oh right, it was in 2.1 🙄 Was going to make a wiki anyway... Just gonna have to remember to add it back! ---- On Tue, 29 Nov 2022 19:50:28 -0500 @.*** wrote ---- That's the worst :-/ I'm still struggling with creating the habit of committing / pushing regularly (to a private remote if you don't want to publish the work in progress) Good to know you'll work on a fix! Also, it'd be good to mention that the write interval is in seconds! Had to find the line with writeIntervalInMs = to figure it out :-D

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

franciskafieh commented 1 year ago

I'll set to 0 and report back!

Hey @etiennepellegrini, did setting it to 0 end up fixing the lag for you?

franciskafieh commented 1 year ago

Note to self: should probably just notify user and disable the plugin until the log note is found in onCreate