notaapp / talk

Issues and discussions for the notes app, Nota.
https://nota.md
60 stars 1 forks source link

Externally created notes take long to show up in Nota (in a 6k+ library) #129

Closed minthemiddle closed 2 years ago

minthemiddle commented 3 years ago

When I create an external note (in my case via Alfred), saving to Dropbox, it takes many seconds (10s+) until it shows up in Nota.

I also tried it on non-cloud (Mac native files), it is also slow, but I could not compare the times it took.

https://www.loom.com/share/2ecdc3571bbb4a8580c53dc45647f36b

astoilkov commented 3 years ago

Yes. This is caused by the fact that you have a workspace with over 6 thousand files. We still haven't optimized for the use case where you have a big workspace and you are frequently creating files outside of it. We should do something about this.

Thanks.

astoilkov commented 3 years ago

One quick question. Do you have an easy way to count how many folders you have inside of your workspace? I'm asking because the performance depends more on the number of folders and not so much on the number of files.

Update: I want to make sure there isn't a problem that I don't know about.

minthemiddle commented 3 years ago
minthemiddle commented 3 years ago

Yes. This is caused by the fact that you have a workspace with over 6 thousand files. We still haven't optimized for the use case where you have a big workspace and you are frequently creating files outside of it. We should do something about this.

I could imagine that all folders and files are being watched (comparably to tail -f). Within my library, only a small amount of folders change frequently (for me namely the monthly folders and Zettelkasten folders). I could imagine that setting priority folders to watch (and respond quickly) would work and help in my case.

astoilkov commented 3 years ago

Folders: 190

Folders are not a lot. I will create more test workspaces to explore the issue.

I could imagine that all folders and files are being watched (comparably to tail -f). Within my library, only a small amount of folders change frequently (for me namely the monthly folders and Zettelkasten folders). I could imagine that setting priority folders to watch (and respond quickly) would work and help in my case.

Yes. I was thinking about a similar solution.

astoilkov commented 2 years ago

We improved the code related to updating the workspace. The change will be included in the next release.

Now it should be at least 10-30 times faster.

@minthemiddle I want to thank you for all the issues you have spent time writing us. We appreciate it a lot!

astoilkov commented 2 years ago

@minthemiddle This should be fixed in 0.34.0. Can you test to confirm that?

minthemiddle commented 2 years ago

@astoilkov Yes, it's a lot faster. I close the ticket.