[wx 2.6.3, Mac OS X 10.4.8, gcc 4.0.1] extremely slow wxStyledTextCtrl::Colourise()

Yvan Bourquin yvan.bourquin at epfl.ch
Sun Nov 19 14:08:54 PST 2006


Hello,

I'm developing a multi-platform source code editor with 
syntax-highlighting based on wxWidgets.
I have a problem with the wxStyledTextCtrl::Colourise() function on the 
Mac platform.
This function is extremely slow on Mac, e.g. it takes about 40 seconds
to do the lexing of a file of 500 lines of c++ code, while the same 
function returns
within 1 second on the Windows and Linux platforms using the same 
version of
wxWidgets. (I'm using the wxSTC_LEX_CPP lexer).
The problem appears when the user wants to scroll down the 
wxStyledTextCtrl :
the slider blocks and the applications becomes non-responsive and shows
the Mac "wait" cursor, because the lexer is doing the lexing (Colourize())
with extremely poor performance.

os: Mac OS X Version 10.4.8
wx: wxwidgets 2.6.3
gcc: i686-apple-darwin8-gcc 4.0.1

Anyone is experiencing the same problem or have a workaround ?
Any help is welcome !

Yvan Bourquin

-------------------------------------------
Yvan Bourquin
Biologically Inspired Robotics Group (EPFL)
Swarm-Intelligent Systems Group (EPFL)
Cyberbotics Ltd
http://birg.epfl.ch/
http://swis.epfl.ch/
http://www.cyberbotics.com/
+41 21 69 36714 (BIRG)
+41 21 69 36662 (SWIS)
-------------------------------------------




More information about the wx-users mailing list