SAX2: Namespace Processing and NSUtils helper class

David Megginson david at
Thu Dec 16 15:01:25 GMT 1999

Miles Sabin writes:

 > David Megginson wrote,

 > > still, it does add an extra level of indirection, and every 
 > > indirection in an API is an open flame in a powder magazine
 > > (it won't cause any problems as long as you're careful and 
 > > follow the proper procedures, but...).
 > Bear in mind that a decent JIT should be able to eliminate a
 > lot of the overhead in this case.
 > I really think you're getting too hung up on the performance
 > issue too early. Sure, tune it if it proves to be a bottleneck,
 > but, please, do some benchmarks before twisting the twisting
 > the design in the name of optimization.

I think there's a bit of confusion here -- at least, my comments that
you quote above have nothing to do with optimization or performance
questions.  The problem is that it's not self-evident which is the
better design.

Every level of indirection is an open flame because it increases the
difficulty (and cost) of learning and implementing an API, which
leads to several problems:

a) the API is less likely to gain acceptance;
b) the API is less likely to be implemented correctly; and
c) the costs of learning, teaching, and documenting the API are higher.

I don't doubt that we can optimize for either case when the time comes 
-- my NSUtils class was one example of how we could optimize for the
single-string case (though obviously, it needs a little tweaking).
Right now, however, this is strictly a design question.

All the best,


David Megginson                 david at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list