I checked the app once again. In fact the source is roughly 12 KByte
big and contains 620 StyleRuns. Well, I stell feel, that this shouldn't
be that slow.

I enhanced the speed by switching to MemoryBlocks from 2,9 secs to 1,2 secs, but the process is still very slow for a 12 KBytes of String to get parsed...

I'll drop it all over, since it won't ever be so fast, that I can reconfigure the style-runs while the user type - I expect. Or, in other words, the time needed to code this isn't in a good relation to the usefulness of the solution.

And, yes, Charles, the Text property is <> "", since the app set the text just
one line before the Bold(2,3)=true statement.

Thx for your help!

Am 09.07.2006 um 21:49 schrieb Charles Yeomans:


On Jul 9, 2006, at 2:15 PM, Stefan wrote:

I modified an app in such a way, that the user is able to add styled text. Works fine.

Then I changed it, so that the app highlights certain syntactical text items. Give a very small text of roughly 1 K, the process is fast. Given a text of roughly 5 KByte, the app roughly
a noticeable amount of time (2 seconds) to show the result.

But why? 5 K Text is very few, roughly 20 StyleRun elemements shouldn't be too much too. Moreover, the app 'parses' the text for HTML tags in once single pass.

Any ideas, how this process could be made faster?

Yes. break the text into multiple paragraph-sized StyledText objects, then color each.

BTW: Since StyledText failed to do the coloring trick, I used StyleRuns. Might this be a problem? StyledText crashed as soon, as I tried to change any style property e.g. StyledText.Bold(2,3)=true . RB's StyledText demo worked - but nothing else.

Are you certain that the Text property is <> ""? I reported such a problem several months ago. Perhaps you should isolate the problem and report it.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to