abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject IRI implementation improvements
Date Mon, 05 Nov 2007 17:40:21 GMT
Quick update,

As I mentioned previously, I've been working on some improvements to the
IRI implementation.  Before, for a variety of reasons, the first time
you created an IRI within Abdera, it would take at least 500ms to
initialize the IRI support code.  This was due to a variety of factors
including a very inefficient unicode normalization implementation.  I've
gone through the code and have made a lot of improvements and I modified
the Abdera class so that when you call new Abdera() for the first time,
the IRI stuff is initialized.  Testing on my local machine, initializing
the Abdera instance takes around 500-600ms now, which involves init'ing
the IRI code and scanning the classpath for extensions.  Creating an IRI
for the first time now only takes around 20-40 ms; after that it's
around 1ms.

There are a number of changes to the IRI class.

 1. The equivalent method has been removed.  We're not using it for
    anything and the code necessary to support it was causing a
    performance it.

 2. No more URI-to-IRI conversion.  We can go from IRI-to-URI with
    no problem, but the code supporting the URI-to-IRI converstion
    was causing a performance hit (it was the same code used to
    support the equivalence checking)

 3. The "getRaw..." methods have been removed. These are no longer
    necessary because of items 1 and 2 above

For me, all of the tests are passing.  If there are no objections, I
will go ahead and check in the code.  Ordinarily I would go ahead and
check in before asking but since the IRI class is a core dependency and
because there are API changes, I figured I should ask first :-)

- James

View raw message