On Mon, November 13, 2006 10:10 pm, Ian R wrote:
>
>
>> Perhaps you could post your style-massage code and let us have a look.
>
>
>    InputText = me.StyledText
>
>    me.Visible = FALSE
>
>    runCount = InputText.StyleRunCount - 1    // this is the line that is
being so slow


Are you SURE that's the line that's slow? In my StyledText tests it's the
"InputText = me.StyledText" line that's slow. My tests are on a Mac but
for some reason assigning one styledText to another is *dreadfully* slow.
I wrote my own routine and on the same text, RB's assignment was 900K
microseconds (nearly a whole second) where mine was as little as 12K
microseconds.

I don't know if the same slowdown would happen on Windows (my
understanding is that the EditField implementation is very different
internally for each platform), but if it is, I can post my short routine.
It's part of an article I'm writing for the next issue of REALbasic
Developer.

I'd recommend you add some code to time that instruction and see if that's
really where the bottleneck is. Seems a strange place for a slowdown --
it's merely doing a Ubound sort of function, I'd imagine, getting the
upper boundary on the stylerun array. Why would that be slow?


-- 
Marc Zeedar
Publisher
REALbasic Developer Magazine
http://www.rbdeveloper.com
_______________________________________________
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