[Patch] HTMLCollection cache (was: phpnuke 7.3 slowness)

David Faure faure at kde.org
Wed Sep 8 09:28:30 BST 2004


On Wednesday 08 September 2004 09:09, Koos Vriezen wrote:
> On Sat, Sep 04, 2004 at 06:29:55PM +0200, Koos Vriezen wrote:
> > On Sat, Sep 04, 2004 at 04:20:16PM +0200, Koos Vriezen wrote:
> > > Unfortunately, HTMLCollectionImpl::getItem only digs inside the tree, so
> > > as soon as we hit a lastChild leaf, we must start again for
> > > HTMLCollectionImpl::item. Still this give a more then five time speedup.
> > > The length calculation is reduced to only one in the above case.
> > 
> > Silly me, HTMLCollectionImpl::nextItem has a way to do that smart. So
> > attached an even faster one :-)
> 
> Actually given this patch, doesn't it make sense to implement 
> HTMLCollectionImpl::firstItem as HTMLCollectionImpl::item(0) and
> HTMLCollectionImpl::nextItem as HTMLCollectionImpl::item(cached_pos+1),
> and mark these as deprecated in dom/html_misc.h? Not only are they
> not needed anymore, they are not safe for domtree changes while iterating
> in the current implementations.

OK.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kfm-devel mailing list