Last week's discussion on whether or not OGNL was a dead project
inspired me to actually dig up a profiler and spend a bit of time profiling
one of my tapestry 3.0.3 apps under tomcat. I was curious to see where my
CPU time was going when I ran the thing as it wasn't quite as "snappy" as
I'd hoped.
To my surprise (as I assumed such calls so infrequent as
efficiency doesn't matter), OGNL does, indeed, appear to be something of a
significant performance boat anchor.
In my App:
35% of all CPU time spent on just two ognl functions:
ognl.Ognl.getValue() ongl.Ognl.setValue()
45.7% of all CPU time was spent on one or another ognl function
And that's a database with heavy database access through
Hibernate although without a whole lot of complex server-side application
logic; it's mostly DB & presentation.
I don't know how this meshes up with Howard's own internal
profiling that he references on his Blog post, but for my app, in my
environment, I'd say OGNL is definitely a major culprit.
--- Pat
PS As always, your mileage may vary with any profiling.
Different apps in different environments will burn CPU on different things,
so I wouldn't necessarily try to use this as evidence for a global argument
that "ognl is the suxor always and everywhere!".