- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Thu, 07 Jun 2007 17:39:19 -0500
- To: Laurens Holst <lholst@students.cs.uu.nl>
- CC: "public-html@w3.org" <public-html@w3.org>
Laurens Holst wrote: > XBL is again just one of the languages. If you’d include XBL directly > into HTML The question is why you would do this. The whole point of XBL is to have a shared binding definition living outside the HTML file, with all URI resolution in that binding happening relative to the _binding_. Including the XBL inline more or less defeats the purpose, unless you're using it multiple times in that one page. > Well, I think you mentioned tests of your own without giving any > specific numbers, where are those True. ;) I'd need to rerun the tests to regenerate the numbers, which I'm not in a position to do in the next month or two due to time constraints. But I'm happy to do that before a final resolution on this issue, again subject to time constraints. Given your numbers I will in fact need to do that, if I can. > Attached are 2 testcases. One for XHTML (which uses xml:base and > recursive lookup), and one for HTML. Of course there are differences other than just xml:base handling between the two... > Furthermore, deeper nesting does make it a little slower, but the > slowing is relatively insignificant It's 7%. That's usually significant enough to reject changes if they cause a regression of that magnitude, for what it's worth. > and happens in both cases, so I wouldn’t credit this difference towards the baseURI implementation. Indeed. > These results make perfect sense because, is a couple of simple "if > (!@xml:base) return parent.baseURI;" iterations really going to make any > noticable difference? Depending on how many other attributes the elements have and how many elements there are, absolutely. Note that the 10-deep nesting is about an order of magnitude less than what happens on typical websites, by the way. And there are usually more attributes flying around. > Binary check, method call, return value, these are some of the simplest > operations possible. Binary check in this case is not necessarily O(1) in number of attributes. Method call can be a very expensive proposition (virtual methods). > If this would matter in any significant way, then > you’d better remove all those subroutines from all your code Inlining code is a common optimization technique, yes. Usually done by the compiler. ;) > Sure, I guess it’s odd, but that’s what I’ve been talking about. UAs > already do it with <base> in HTML Which is sad, but there it is. > and Firefox with xml:base in XHTML as well. Testcase? That's not what I see over here. -Boris
Received on Thursday, 7 June 2007 22:39:30 UTC