mcndt / obsidian-toggl-integration

A Toggl integration plugin for the popular knowledge base application Obsidian.
GNU General Public License v3.0
282 stars 20 forks source link

Feature Request: Queue API Calls #50

Closed MalignantCarp closed 2 years ago

MalignantCarp commented 2 years ago

Definitely enjoying being able to reduce one more application I need to have running through my various workflows, so many thanks for the plugin. I had almost given up on using Toggl, to be honest, but this certainly helped me keep the tool. :)

However, I like to have a landing page with a number of different summary queries that shows me kind of a bird's eye view of my productivity, which inevitably leads to:

image

I suspect this is because there are 6 blocks of toggle queries on the one page and I am assuming they are all being sent at the same time. If they were instead entered into a queue and only one or two queries sent at once with their blocks being updated once data is returned, that would probably eliminate this problem. It would delay the appearance of the queries, but at least they could appear in the appropriate order. Right now they randomly fail. πŸ˜‚

I wouldn't consider this vital. I can probably cull one or two of the queries, but it would be a nice safeguard to enter into the system at some point.

mcndt commented 2 years ago

Interesting. Yeah implementing a queue system would require a bit more engineering work so I'll have to see when I can fit this in.

On a more fundamental level, I have been thinking of caching data on startup since theoretically all possible reports can be fullfilled by filtering the data of an entire year. But this raises even further complexity in refreshing the cached data...

As a 'workaround', what I have done is have one main note for collecting time reports, which contains links to notes that contain reports on specific topics:

image

Each page contains just one or two report blocks.

I do recognize this as an issue though, and I'll see what I can do about it!

mcndt commented 2 years ago

I haven't stress tested this, but in the new version 0.8.0 reports are cached during your user session. Let me know if this helps this problem.

I'm closing this issue for now, but feel free to reopen or comment if your troubles persist.