Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Effects on Joplin's performance #39

Open
Klemet opened this issue Oct 13, 2021 · 11 comments
Open

Effects on Joplin's performance #39

Klemet opened this issue Oct 13, 2021 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@Klemet
Copy link

Klemet commented Oct 13, 2021

Hello there !

Thanks for your wonderful plugin; I'm always amazed by how good it looks, and as I organize workshops to help colleagues use Joplin, it's always one of the first ones I show !

However, as I was pondering was Joplin became a bit slow on my computer (see this issue), I noticed that the problem went away when I disabled the plugin.

I cannot say with 100% certitude that the issue I encountered was only due to the plugin; but by testing with/without the plugin, and with every other setting of Joplin not changed, I can see the problem coming back (e.g. a noticeable lag when switching notes or notebooks, even when the plugin's panel is closed).

I just wanted to check if anybody else had the same issue, or if it was just me. I was wondering if it might be due to some update that the plugin has to do when a note is switched, even if the plugin's panel is closed. If that's so, could there be a way to disable it in that case ?

@treymo
Copy link
Owner

treymo commented Oct 13, 2021

Hey @Klemet, thanks for the heads up on the potential performance issue. What version of the Link Graph UI are you using and on what platform?

@treymo treymo self-assigned this Oct 13, 2021
@treymo treymo added the bug Something isn't working label Oct 13, 2021
@Klemet
Copy link
Author

Klemet commented Oct 14, 2021

Thank you for your interest ! I'm using Link Graph UI v1.1.1 with Joplin 2.4.9 on Windows 10, with a i7-6700 CPU (2.6 GHz) and 16GB of RAM, to be precise.

@special0star1
Copy link

I have the same problem. It is recommended to only display the link graph of the current notes to improve the speed of Joplin,

@treymo
Copy link
Owner

treymo commented Feb 15, 2022

Hey @Klemet, I've made a minor performance improvement in v1.1.5 which I released this week. Just wanted to let you know I have a couple more in the works now that I hope will be more significant improvements

@Klemet
Copy link
Author

Klemet commented Feb 15, 2022

That's great to hear ! Thanks, @treymo ! I'll be glad to test it, and see how things change.

@treymo
Copy link
Owner

treymo commented Feb 15, 2022

Hey, are you able to build the repo from the main branch yourself to test out the improvements? I just merged them.

You basically just check out this repository then point Joplin at the repo and restart: https://joplinapp.org/api/get_started/plugins/#install-the-plugin

I'm wary to release a new version with all my changes as I'm trying to figure out what is going on in #49

@Klemet
Copy link
Author

Klemet commented Feb 17, 2022

I just tried v1.1.5, and it seems to be worst then before; Joplin UI's is lagging more than ever, time to switch between notes is still slowed down, and the graph takes around 10 seconds to generate and stabilize (it moves a lot at the beginning) when switching to another note.

I'm really sorry if I'm the one doing something wrong there ! I can't seem to find where the problem lies either.

@treymo
Copy link
Owner

treymo commented Feb 17, 2022

Oh yikes. Yeah I'm really struggling to figure out what's going on with folks having issues. I may need to just make a hidden debug menu within the plugin to get useful feedback.

I just audited the changes in that release and it was basically just removing a for loop (I expected an improvement) and then formatting the code (expected no functional changes).

I'm going to push forward with the v1.2.0 release and basically just hope all the performance improvements in there actually help and don't cause more issues. If not, I'll maybe revert to v1.1.4 until I figure out what is going on and build a debug UI

@Klemet
Copy link
Author

Klemet commented Feb 18, 2022

I understand the struggle :c . Still, remember that this is just a feeling of it being worse; I couldn't take the time to measure it properly, which is difficult as the lag are mere seconds, or less than seconds.

If I had to guess, I think that this might be due to the plugin re-drawing the graph at every note switch. This could be very variable according to the number of notes and links in people's database, which could explain the differences between people in terms of performance. If the graph was able to not be re-drawn at every note switch (for example, the view of the graph would just centre on the note being switched to), and especially not if the graph is closed, I think that it could be solved. But this is just a hunch; maybe you could try to see if people on Joplin's forum could be motivated to help if they like the plugin !

@treymo
Copy link
Owner

treymo commented Feb 18, 2022

Do you use the max degree of separation setting? Is it greater than zero? This could help me isolate the issue as there are a couple methods of checking for updates and redrawing.

In the 1.2.0 release, I skip loading all the notes if max degree == 0 and when you change notes it doesn't requery the Joplin DB, but jut redraws.

I'll see if I can just re-center the graph instead of redrawing at all

@Klemet
Copy link
Author

Klemet commented Feb 22, 2022

I just tried the max degree of separation; when activated, things we much, much better ! It seems like there were no lag at all this time when switching between notes. Great advice !

This makes me believe that the problem is in re-drawing the graph; I think that re-centering could be a great idea !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants