Home Download Buy Blog Forum Support

Syntax highlighter performance

Syntax highlighter performance

Postby artee on Fri Jun 05, 2009 9:00 am

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 :(

cheers,
Artur
artee
 
Posts: 32
Joined: Sat May 30, 2009 10:33 pm

Re: Syntax highlighter performance

Postby jps on Fri Jun 05, 2009 11:33 am

Is it only the loading time that's an issue, or are the performance issues while editing too?
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Syntax highlighter performance

Postby artee on Fri Jun 05, 2009 2:48 pm

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
artee
 
Posts: 32
Joined: Sat May 30, 2009 10:33 pm

Re: Syntax highlighter performance

Postby jps on Sat Jun 06, 2009 12:27 am

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.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 24 guests