Stripping html tags (was Re: Problem with revExecuteSQL - More)

Richard Gaskin ambassador at fourthworld.com
Sun Nov 4 11:42:30 EST 2007


Dave wrote:
> One word of warning on using a field to strip HTML text - it's VERY  
> slow.

When a field is on the current card, the engine makes the reasonable 
assumption that it may be used for editing, and does extra stuff to the 
object record to make sure it renders well.  That extra stuff slows down 
access, a lot, and much more so when the screen is unlocked.

For stripping htmlText, since this operation doesn't need a visible 
field you can use one on any unopened card or stack, which speeds things 
up at least several times.

In my tests here, using the templateField measures about the same as 
using an off-screen field.

And depending on how you run your test, you may see an order of 
magnitude or more performance increase using either the templateField or 
an offscreen field rather than a lengthy handler to do the stripping.

-- 
  Richard Gaskin
  Managing Editor, revJournal
  _______________________________________________________
  Rev tips, tutorials and more: http://www.revJournal.com



More information about the use-livecode mailing list