[jdom-interest] Is beta-5 much slower than beta-4?

Jason Hunter jhunter at collab.net
Wed Oct 18 16:32:36 PDT 2000

Rajendra Paul wrote:
> Based on a test described below, I am concerned that beta-5 is
> significantly slower (like 50%) than beta-4.  

I'm not surprised it's slower.  In beta5 we're doing additional sanity
checking of content.  50% seems like a lot though.  Sorry I don't have
time to investigate; maybe someone else does.

This reminds me of something I've been thinking about wrt performance. 
Elliotte wrote code that checks all text content to ensure it contains
only legal XML characters.  We haven't included it yet because it causes
a significant performance hit (maybe 10%).  What I'd really like is a
way to configure if you want this checking on or off, but unfortunately
that's very difficult without adding factories for all object creation,
and I don't want to go there.

So what I was thinking perhaps we do this:

1) Have a ValidChecker which checks the document is "valid" against a
DTD.  This has always been planned, and I think it's a good idea.  How
it's going to work is we validate a document in one fell swoop instead
of as the doc is created.

2) Have a WellFormedChecker that checks the document is "well formed"
per the specification, following the same approach.  We check
well-formedness in one fell swoop.  It's not as nice because you have to
ask for error checking, but it's simply unacceptable to require all
content is checked.  It's nice in theory but in the real world will
involve people hacking up the API to remove that feature.

I'll leave it open for discussion if we should do name checking on

What do people think?


More information about the jdom-interest mailing list