JS document.xxx is really slow

David Faure david at mandrakesoft.com
Sat Nov 16 15:07:47 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 16 November 2002 01:37, Koos Vriezen wrote:
> On Sat, 16 Nov 2002, David Faure wrote:
> > In fact I would even suggest that a private helper method might be enough for
> > this, an actual separate class isn't necessary (since it's created/destroyed each
> > time). The private member vars would become the local vars of the private method.
> 
> No, because its a recursive func, would need to pass all these
> variables each time. I think using a function object is faster (it's also
> created on the stack here).

Ah, I forgot that it's recursive. Ok, now I see :)

> > Feel free to apply whichever variant (btw some comments need to be moved, etc.).
> 
> Ok and I'll delete all those lines that are now commented out in this
> patch.

Oh - and I forgot to mention: you should also use that class in HTMLDocument::hasProperty()
It has to perform the exact same lookup.
(To test it use for instance  "with (document) { debug( foo ); }")

Thanks.

- -- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE91l9D72KcVAmwbhARAjh4AJ46HPfHDrxn+ziWRK6Hu0Kw1XVZXACgk23A
wFHGqmlayQEgKp8sTkkiH5o=
=KZSD
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list