Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

bad performance with code folding #12444

Closed
didiraja opened this issue May 22, 2016 · 7 comments
Closed

bad performance with code folding #12444

didiraja opened this issue May 22, 2016 · 7 comments
Assignees

Comments

@didiraja
Copy link

I use Brackets release 1.11 on my personal computer with Win7 x64. When I updated to get new features, the versions 1.15 e 1.16 turns out with a problematic delay while typing. This part, I know that is normal for some users.

So I downgraded back to 1.11. But, code folding is an important feature, so, I installed the plugin (the same that was posteriorly incorporated to official release). After that, the release that was so nice on my computer went bad.

This is more a suggest than an issue report: Maybe is not just it, but, maybe the problem is with the code folding plugin.

@ficristo
Copy link
Collaborator

You could try to tweak the preferences for code-folding:
https://github.com/adobe/brackets/wiki/How-to-Use-Brackets#list-of-supported-preferences
For example you could try changing code-folding​.saveFoldStates to false and see if Brackets does any better (of course loosing the ability to save the code folding state).

Other thing: is it slow for every file, or only if there are a lot of code folding markers?

/cc @thehogfather the original author of the plugin, maybe he has some ideas.

@thehogfather
Copy link
Contributor

most of the time I would say if you've traced performance issues down to code folding, it might be because of the preference to saveFold states. Saving and reloading fold states can be expensive on large files (particularly if one has collapsed all fold regions in a large file).

I would suggest trying @ficristo's suggestion of disabling the saveFoldStates preference. That might make some difference.

@lkcampbell
Copy link
Contributor

@thehogfather, I'm having this problem as well, so I tried setting code-folding.saveFoldStates to false and I ran into issue #13264 that I just filed.

@lkcampbell
Copy link
Contributor

lkcampbell commented Apr 7, 2017

@didiraja if you are running a development build of Brackets, @thehogfather just fixed the problem with saveFoldStates. Update your build and try setting it to false now and see how it works.

If not, should be fixed in next release.

As for me, it fixes everything.

@thehogfather I have a solid repro of the code folding performance problem, I will file the bug this weekend. I don't really need the fix given that you gave a great workaround, but it would be nice to solve it once and for all, agreed?

@lkcampbell lkcampbell self-assigned this Apr 7, 2017
@thehogfather
Copy link
Contributor

@lkcampbell agreed.

@lkcampbell
Copy link
Contributor

@thehogfather filed the new performance issue #13282.

@lkcampbell
Copy link
Contributor

@didiraja, there is a second performance fix for cold folding, which will be available for version 1.10.

Since no steps were provided to reproduce this issue, I am going to assume that either using the workaround of setting code-folding.saveFoldStates to false, and/or the new performance fix, will fix your performance problems. I am closing this issue as fixed.

If this is not the case, and you can provide some steps to reproduce your issue, free feel to reopen this issue so we can investigate it further.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants