On 2/19/20 2:58 AM, Richard Gaskin via use-livecode wrote:
In Peter's view, he would be surprised to find any case where parsing htmlText would be faster than working with the styledText array.

This seems to pan out. Bernd sent me a nice test stack that uses styledText and does what Mark W. suggested. It counts words and calculates the scroll. (It's a variation on the handler you posted, Richard.)

I was impressed with Hermann's handler because it avoided scanning through a long series of runs and used itemDelimiter, which I thought was pretty clever. But it did take much longer to execute.

In each timing test I looked for a link that occured near the bottom of the text, which meant that there would be a large number of runs to scan (several thousand), or a large amount of text for the engine to work with.

Parse runs: 40-50ms
Use itemDel: 400-500ms

I haven't converted Bernd's script to use formattedStyledText yet but that looks like the way to go.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to