Hi Michael,

How large is large? Could you give file size and number of entries?

Reading it using DOM takes about 10 times as much memory as in file size. So trying to avoid that could be one concern.

On the other hand, perhaps the HashMap implementation is not efficient enough for your needs. I can't tell how well the xsl:key indexes perform, but I haven't had trouble using it on over thousand records (in an attempt to do a select distinct using XSL).

You might be able to access your lookup from an XSL stylesheet (using document() ), making it use xsl:key on that document (just switch context to a node from the lookup document) and use plain XSL to make this work...

(I still think writing XSL is easier than writing Java)

Not aware of a transformer that particularly suits your requirements...

Cheers,
Geert

Lopke, Michael wrote:


I was wondering if there was a way to do this in Cocoon.

I have a java servlet that queries a database and produces xml. Part of this includes translating some of the data, like product numbers, using a HashMap. The HashMap is built from an xml source and is very large. Populating it takes a long time so I set it up using a singleton class and a timer to provide an update mechanism that wouldn't cause performance issues.

I was wanting the same functionality using Cocoon but want to avoid the performance issues. Is there a transformer I can use? Should I consider writing one?

Thanks,
Mike Lopke


-- [EMAIL PROTECTED] IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to