Sublime Forum

Syntax highlighter performance

#1

Hi All,

Dou you have problems with editor performance while loading medium-size Java/Python files?
I have ~157 KB java file. If I use Java/Python syntax highlighter it takes about 2 seconds to load this file.
After changing file extension to txt there are no problems here.
Cpp syntax highlighter is much faster than Java/Python :frowning:

cheers,
Artur

0 Likes

#2

Is it only the loading time that’s an issue, or are the performance issues while editing too?

0 Likes

#3

Hi

Only loading time. All others editor related operations are fast.
Comparing file loading time to e.g. Scite (based on Scintilla component) - Sublime is simply slow.
This problem is IMHO related to regex used to syntax parsing.

Artur

0 Likes

#4

Sublime does quite a bit of work at file load time, more than most other editors, due to how it works internally. Part of this is a trade off for efficient rendering performance, which is required for the minimap. As you notice, the complexity of the syntax definition is one factor in how much work needs to be done.

In part to make up for this, file load is asynchronous, so you can still edit other files while one is loading.

0 Likes