-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Rendering freezes editor #10424
Comments
Could you share the note that was causing the issue? |
All my notes are causing the issue, because I use a lot of math. Here is an example file that is really pathological, but should highlight the issue: example.md Thanks for trying to address this. Please keep in mind that a powerful computer could be mitigating the problem. |
It's not obvious what might be the issue. As I was expecting rendering is actually fast because we cache all these math formulas. So it's something else, maybe the editor, or maybe Electron taking time to display the HTML content, although that would be surprising. |
Yes — inspecting a render after running the test steps for this pull request suggests that "recalculate style" and "layout" take a long time: |
… process This commit moves Joplin's markdown note viewer to a separate process, preventing Electron's rerendering from blocking the UI. Because of electron/electron#38749, video/audio resource streaming might have higher latency, as some request handling is now implemented in JavaScript as a workaround.
Operating system
Linux
Joplin version
3.0.6
Desktop version info
Joplin 3.0.6 (prod, linux)
ID del Client: f9d2e9edf10e4f5dac96202b4820f0bf
Sinc. versione: 3
Profilo versione: 47
Portachiavi supportato: No
Revisione: 18b9f5c
Current behaviour
When editing, Joplin waits for you to stop typing, and then renders the new markdown in the right panel. When the markdown is "heavy" to render (lots of katex and mermaid), the rendering can take up to one second on my computer.
During this time the editor hangs so every time you stop typing for a couple seconds and then resume, you can't type anymore for a brief moment. It's really frustrating.
Expected behaviour
Joplin's editor doesn't hang when rendering.
Taking a shot in the dark, I would say the problem is that the rendering panel uses the same thread as the editor. If true, a solution would be asynchronous rendering.
A simple mitigation that eliminates the problem is to have an option to disable automatic rendering, and allow manual rendering through a button.
I'm not familiar with electron apps so I don't know how to benchmark this, but once I have some data I will post it here. Maybe the problem is not the rendering.
Logs
None yet.
The text was updated successfully, but these errors were encountered: