I’ve been pretty busy the last few weeks working on a tiny set of enhancements to OGNL that should help improve the runtime performance of the library.
Much like Tapestry-Prop, the new set of OGNL enhancements rely on javassist to do incremental bytecode compilation / translation of your ognl expressions into their pure java equivalents. There are still plenty of kinks being knocked out here and there, but overall the changes are finally starting to form into something that might actually be usable.
I’d like to be able to take credit for it myself - but the reality is that Drew had already started a lot of work doing exactly this, so I just continued on where he stopped. (using knowledge gained while doing javassist work on Tapestry )
I know people really like seeing performance metrics, so here’s what I’m getting back now from a couple basic expressions:
===================================================================
Constant: 100 + (20 * 5)
java: 2623089 iterations in 1500 ms
compiled: 2559264 iterations in 1500 ms (1.025 times slower than java)
interpreted: 2590897 iterations in 1500 ms (1.012 times slower than java)
Single Property: bean2
java: 2648322 iterations in 1500 ms
compiled: 2622987 iterations in 1500 ms (1.010 times slower than java)
interpreted: 1816261 iterations in 1500 ms (1.458 times slower than java)
Property Navigation: bean2.bean3.value
java: 2634885 iterations in 1500 ms
compiled: 2595186 iterations in 1500 ms (1.015 times slower than java)
interpreted: 538238 iterations in 1500 ms (4.895 times slower than java)
Property Setting with context key: bean2.bean3.nullValue
java: 2638050 iterations in 1500 ms
compiled: 2622542 iterations in 1500 ms (1.006 times slower than java)
interpreted: 563363 iterations in 1500 ms (4.683 times slower than java)
Property Navigation and Comparison: bean2.bean3.value <= 24
java: 2674087 iterations in 1500 ms
compiled: 2622686 iterations in 1500 ms (1.020 times slower than java)
interpreted: 517796 iterations in 1500 ms (5.164 times slower than java)
Property Navigation with Indexed Access: bean2.bean3.indexedValue[25]
java: 2672025 iterations in 1500 ms
compiled: 2583340 iterations in 1500 ms (1.034 times slower than java)
interpreted: 329001 iterations in 1500 ms (8.122 times slower than java)
Property Navigation with Map Access: bean2.bean3.map["foo"]
java: 2572917 iterations in 1500 ms
compiled: 2509147 iterations in 1500 ms (1.025 times slower than java)
interpreted: 404174 iterations in 1500 ms (6.366 times slower than java)
Property Navigation with Map value set: bean2.bean3.map["foo"]
java: 2543566 iterations in 1500 ms
compiled: 2545064 iterations in 1500 ms (0.999 times faster than java)
interpreted: 409172 iterations in 1500 ms (6.216 times slower than java)
===================================================================
This is the direct output from an ant console run, so sorry if the formatting isn’t ideal.
If you are wondering if / when this will be released, I really don’t know. All of the changes made so far have been local to my machine only - but if the patches are accepted then I’d optimistically expect a new maven2 snapshot version of it released sometime this week.
The new changes have also been integrated / tested with Tapestry 4.1.2 already, we’re just waiting for the right infrastructure to show up to commit the changes to. For an example just hit the standard Tapestry demo page, everything there is running on the new code already.
-
1
Pingback on Jun 26th, 2007 at 7:28 pm
[...] - The biggest reason for the delay in this release of Tapestry has been in waiting for the new OGNL bytecode compiler enhancements to stabilize. None of this would have been possible without the kind support / dedication of [...]
Leave a Comment
Latest Entries
- updated foxylicious extension for Firefox 3
- how to fix butt ugly ubuntu hardy heron fonts
- Where are our java leader’s opinions on closures?
- Tapestry 4.1.5 Released && various Tacos project releases (like Seam / jQuery support)
- painting by numbers, or how html cowards hide behind CSS
- Rails component envy
- OGNL 2.7.2 Released
- news flash - Swing is a terrible API to emulate in web development
- hip hop is neat
- good closures, bad closures
Jan 15th, 2007 at 3:26 am
Jesse, like I replied on the OS forums, these numbers look almost too good to be true. We’re attempting to move OGNL to OS to get another release out, but I’m not sure what the current status is.
Is there any way to get a sneak peek at the changes ? I’m more than interested (and I’m quite sure a lot more people are !), due to the potential impact this can have. Thanks !
Jan 18th, 2007 at 10:58 pm
Have you considered something smaller then javassist to depend on? Say ASM.
Jan 20th, 2007 at 8:48 am
ASM ? No I hadn’t considered it yet but should take a look at least if someone thinks it might be a better fit.
Jan 25th, 2007 at 9:51 am
Javassist is definitely easier to use at first (because of the source parsing), but I *love* ASM nowadays now that I’m a little more comfortable with bytecode. With ASM, you just write some code similar to what you want to generate, and then run the ASMifier against it, and ASM prints out Java code which uses ASM to generate the code you wrote. It’s so meta.
Feb 4th, 2007 at 9:58 pm
Any luck on when this will be released? Or is it possible to download a beta / nightly snapshot version?
Feb 8th, 2007 at 8:45 am
Josh: The best answer I can come up with is “soon”. It doesn’t do anyone any good to release the changes “as is” until all the frameworks involved have had a chance to properly go over them and make sure the API makes sense. It’ll happen within the next few weeks I’m sure.