Geoff Canyon wrote:

On Apr 25, 2006, at 4:00 PM, Richard Gaskin wrote:

Anyone have ideas on how to speed up MC's script colorizing?

Funny you should ask. I did this once as a thought experiment, with an eye to never storing the colorized version of the script but generating it on the fly.

I changed the script to get the text of the script into a variable, then build the HTMLtext necessary, then set the HTMLtext of the field.

The code is about 100 times as fast as the existing code -- it does the libURL script in about half a second on my PowerBook.

I can send the stack if you like -- it's thought experiment quality i.e. no documentation and not guaranteed.

Please do. If I can work that into the MC IDE I'll not only add you to the credit list, but I'll buy you a beer as well (one of the benefits of local collaboration <g>).

I agree that scripts should be colorized on the fly, and not replicated with larger HTML copies stored in the user's property space. The MC IDE has always worked that way, and when speed seems an issue I'd rather optimize the on-the-fly solution than start down the slippery slope of complexity that comes with attempting to cache it.

--
 Richard Gaskin
 Managing Editor, revJournal
 _______________________________________________________
 Rev tips, tutorials and more: http://www.revJournal.com
_______________________________________________
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard

Reply via email to