[Greasemonkey] speed and profiling of GM scripts
Aaron Boodman
zboogs at gmail.com
Mon Jun 6 14:36:07 EDT 2005
> In this specific example, my guess is that it won't matter much because
> the amount of code you're generating is small. I would think that the
> slowness has to do with having to re-render the table for every cell
> change. You may get a speed increase if you set the display to 'none' on
> the table, do your modifications, then make the table visible again. But
> that's just speculation.
+1
Also, innerHTML can actually be much faster than direct DOM
manipulation provided that the string concatenation to build the
string is done efficiently (by joining an array of string pieces
instead of using +).
--
Aaron
More information about the Greasemonkey
mailing list