Do we have an idea if same is true of the JSTL FMT tag? (bean tags are now redundant to JSTL).
.V
David Graham wrote:
That's not all that surprising because the java.text.* classes have always been rather slow. I think they create a lot of objects while processing text which slows them down. I've found that I don't use paramterized messages very often anyway.
David
The only caveat I would give is that messages that have parameters are on the order of 100 times slower than those that do not. I did some tests on this a while back and found that the MessageFormat class is the bottleneck. I wrote some unit tests against MessageTag that tracked the time to perform the parsing. Taking the String "Humpty Dumpty sat on a wall" as the first test case and "{0} sat on the wall" as the second (and passing it the appropriate parameter) gave the following results:
500000 unparameterized requests took 296 milliseconds. // "Humpty Dumpty sat on a wall"
5000 parameterized requests took 10607 milliseconds. // "{0} sat on a wall"
YMMV, but if so let's try and find out why. The disparity here is just incredile.
-= J
> David Graham wrote: > > >> It's as fast as it takes to lookup a key in a hashmap. If that's > >> unacceptable then you should write a different jsp for > each language with > >> hardcoded text. > > I'm searching a more automated solution. If the design has to > be changed > every translated JSP should be changed automatically, so > something like a > preprocessor would be great. > > cu, > boris >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]