-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Desktop: Hiding the note preview pane is much slower than showing it for large notes #9890
Comments
i would love to work on this problem, since i am new here can you assist me with where can i find code file? |
You might find this pull request that fixed a related issue to be helpful. I suspect that the fix for this issue will probably involve similar files. |
Hi! The "toggle editor layout" button updates The markdown editor components can be found here: The issue seems to be present in both. How the above information might be discovered.Here's a process that I find helpful when trying to debug issues like this:
In this case, I see that it dispatches a In the joplin/packages/app-desktop/app.reducer.ts Line 156 in ae9c8f2
Searching for
Searching again for joplin/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/v6/CodeMirror.tsx Line 296 in ae9c8f2
Note: Adding Additional suggestions:
|
The Performance tab shows a long running task (takes around 10 seconds) which leads to the measureForScrollbars function inside the CodeMirror package (node_modules) itself. It seems like the main problem is that calculating offsetWidth, offsetHeight and other DOM properties is slowing it down for some reason. I wonder what can be done because the long running task is inside the CodeMirror package itself. |
At least in the CM6 beta editor, the layout performance issue was caused by hiding the note viewer by setting its width to 1px. Using |
I've opened a similar performance issue related to a similar part of the codebase as this issue: #10008. |
Operating system
Linux
Joplin version
2.14.12
Desktop version info
Joplin 2.14.12 (dev, linux)
Client ID: 50a95f7d97414363a84473b388d1916d
Sync Version: 3
Profile Version: 45
Keychain Supported: No
Revision: 6b5c60b (pr/fix-mermaid-save-button-under-graph)
CodeMirror 6 snippets: 0.0.4
Simple Backup: 1.3.5
Current behaviour
Currently, hiding the markdown preview pane is much slower than any of the other layout transitions.
Screen recording:
untitled.mp4
I can reproduce this both with the legacy CodeMirror 5 editor and the beta CodeMirror 6 editor.
Expected behaviour
Hiding the markdown preview pane should be at least as fast as showing it.
Logs
The text was updated successfully, but these errors were encountered: