-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] Navigating between large, code folded files causes performance problems #11255
Comments
Comment by lkcampbell Pinging |
Comment by thehogfather
|
Comment by lkcampbell
|
Comment by thehogfather
Here is a quick overview of what I have found so far. The reason why setting So a quick experiment to address this issue is to prevent the redundant call to restore line folds for files already in the working set. I am currently not aware of any API available in brackets to check if a file is in the working set, (but for now a workaround is to check if the editor object has Here are a couple of charts from a profiling experiment BuggyPatchedIgnore the idle time at the start of this profile. It is clear that the first two calls to switching between the files are still slow - and we can try to figure out how to improve that still. But subsequent calls are close to instantaneous. |
Comment by lkcampbell
|
Comment by lkcampbell
|
Comment by thehogfather oh awesome I'll have a play with that. |
Comment by thehogfather
|
Comment by lkcampbell
|
Comment by thehogfather
So to be clear, the API you suggested does exactly what it says on the tin - unfortunately that functionality is not what we need to solve the problem here. |
Comment by lkcampbell
|
Comment by lkcampbell Closing as fixed. |
Issue by lkcampbell
Friday Apr 07, 2017 at 13:21 GMT
Originally opened as adobe/brackets#13282
OS: MacS 10.12.3 Sierra and Windows 10
Brackets Version: Release 1.9 build 1.9.0-17312 (release 189f6d39a)
Repro Steps:
code-folding.enabled
preference is set totrue
.code-folding.saveFoldStates
preference is set totrue
.code-folding.maxFoldLevel
preference to a high number like100
. Collapse all should really be collapsing all folds.Working Files
section of the Project Sidebar.Collapse All
both files so there is plenty of fold state data.Observed Results:
After three or four loops of navigating to each file, the time it takes for the contents of each file to show up in the editor will get longer and longer, roughly doubling in time for each loop. Eventually, the delay is so long the files can no longer be navigated in a reasonable amount of time.
Expected Results:
The time to navigate to each test file should be about the same regardless of how many time you loop between them.
Workaround:
Make sure
code-folding.saveFoldStates
preference is set tofalse
. You will need PR adobe/brackets#13269 before you can use this workaround.Other Notes:
The problem occurs with all extensions disabled.
Since this problem goes away when fold states are turned off, and the time seems to roughly be doubling each time, maybe new fold states are being appended to old fold states instead of replacing them. Feels like there might be some redundant, duplicate data being saved somewhere, just a theory, haven't tested it.
The text was updated successfully, but these errors were encountered: