You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Childers <jc...@hotels.com> on 2003/01/20 17:18:50 UTC

[OT?] Performant parameter parsing, please

I was doing some tests on our application and ran across the following extremely interesting results:

500000 unparameterized requests took 296 milliseconds.
5000 parameterized requests took 10607 milliseconds.

The first line is just pulling straight (unparameterized) data out of a resource bundle. The second is using MessageFormat to format the message as we need it. The *only* difference between the two methods is that the second makes use of MessageFormat. Based upon a brief search these numbers do not seem out of line with other results: MessageFormat is known to be very slow.

So my question is this: Is there a better way to format messages other than using the MessageFormat class? I'm leaning towards writing our own implementation that just does what we need, hopefully faster, but before I tear off and do this I am wondering who has had a similar experience.

-= J

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>