[Webkit-unassigned] [Bug 33696] let's cache nodelists instead of dynamicnodelist::cache
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 22 01:50:58 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=33696
--- Comment #23 from Maciej Stachowiak <mjs at apple.com> 2010-01-22 01:50:57 PST ---
(In reply to comment #22)
> (In reply to comment #21)
> > Mozilla has been returning the same NodeList from getElementsByTagName for a
> > long time:
> > https://bugzilla.mozilla.org/show_bug.cgi?id=140758
> >
> > It's not clear if they know this technically violates the DOM Core spec, but it
> > does seem to imply the behavior is safe for Web compatibility.
>
> Yep, I verified that Mozilla caches node lists as well.
>
> And regarding standard. There is funny inconsistency. If you take a look at
> Document wording it says new, but for Element wording it doesn't say new for
> getElementsByTagName, but does for getElementsByTagNameNS.
>
> Answering another question: gain is due to reduced pressure on GC, so producing
> new JS wrappers would most probably kill the optimization. And Mozilla bug you
> spotted says roughly the same.
>
> So the conclusion is we are waiting for changed HTML5 spec?
>
> If yes, any ETA?
>
> And thanks a lot for very interesting investigation of the question.
I think we should suggest a change or erratum to the DOM Level 3 Core spec. It
seems like even if returning a new object was intended, it's not what
implementations do. I suggest mailing public-webapps at w3.org to start a
discussion. Or I can do it if you'd rather not deal with the standards groups.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list