The CSS parser for LIVEditor
I always want to make my LIVEditor text editor runs and responds to user’s actions as fast as possible.
As you might have guessed, LIVEditor contains a CSS parser whose most important job is to tell which and where the css selectors and css attributes are defined in the input .css file.
The CSS parsing speed
The the css parser is home-grown and it does its job pretty well, but I was not satisfied with its speed.
so today I’ve spent several hours investigating it again and tried to improve it’s parsing performance.
Threaded CSS parsing
As far as UI response time is concerned, the speed is very good, especially when the parsing is delegated to another thread so it doesn’t block the man UI thread.