I have a RegExp based tokenizer that would actually take a few seconds to parse 50k of text. However, if I was to use that to build a text editor, I would tokenize the file once, when a file loads. On subsequent edits I would then only tokenize substrings, starting one token behind where the edit happened and ending one token after. It would be more complex to manage if you are also considering grammar rules, but you shouldn't need to for basic hightlighting.
Peter
On 9/27/06, Flex Brasil <[EMAIL PROTECTED]> wrote:
My benchmarks shows that the flash player html render is pretty fast.
It has a acceptable behaviour with 50KB to 100KB of text.
The algorithm to find the matching strings and comments is the bottleneck.
So, no matter if I replace text, setTextFormat or rewrite the htmlText property,
my solution can“t be faster enough inside flash player.
__._,_.___
SPONSORED LINKS
| Software development tool | Application development software | Development software |
| Development outsourcing software | Embedded software development |
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
