TextEditor::createFold takes extremely long time in the last version


#1

I use folds and markers quite extensively in my plugin (not public yet), and I believe that in the last version (1.0.11, Mac) I have encountered performance regression.

Creating a fold takes about a second in the current version when the fold is created through TextEditor::createFold, and about the same time to unfold it. Profiling shows that most of the time is spent in DisplayBuffer.refreshMarkerScreenPosition. Even if I temporarily destroy all my markers and restore them later, it still takes the same amount of time.

However, creating fold manually (clicking on gutter) is immediate, even when all my markers are present.

EDIT: It seems that this issue only happens when the file is opened automatically when Atom starts (that is, file was opened in the last session, Atom was closed and then Atom was opened again). When I close the file, reopen it, the issue is gone.


#2

Interesting. Can you post an Issue on https://github.com/atom/atom and include the profiling information you collected? Also, when you do, can you post a link to the Issue here in the topic?