On 20-feb-06, at 22:45, Joseph J. Strout wrote:

At 10:42 PM +0100 2/20/06, Erne wrote:

this simple code is enough to freeze the app for several minutes if you put in a text with 100 or so paragraphs:

Thanks, Erne -- that's a great code snippet. Please consider adding it to the feedback report (if you haven't already).

I imagine that st.Paragraph(i) is currently starting its search from the beginning each time -- solving that could be tricky, as caches can easily get outdated when you have mutable objects like these. But, maybe a simple solution would be to add a new method, st.Paragraphs, that returns all the paragraphs at once in an array.


Well, I have a similar code snippet retrieving StyleRuns instead of Paragraphs
and it didn't show the same problems

though I admit that Paragraphs are likely to outnumber StyleRuns several times in average text (but who knows how creative can be an user :?), there seems to be definitely something weird in the Paragraph retrieval routine.


Thanks for listening, Joe


Cool Runnings,
Erne.

/ |\ |\  | /
– |/ | \ | –
\ |\ |  \| \

_______________________________________________
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