click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilberto C Andrade (JIRA)" <>
Subject [jira] [Commented] (CLK-306) Replacing OGNL with MVEL
Date Fri, 18 Oct 2013 19:25:42 GMT


Gilberto C Andrade commented on CLK-306:

I've found the problem, I think:
	public void test_MVELService() throws Exception {
		PropertyService ps = new MVELPropertyService();

		for (int i = 0; i < 100; i++) {
			Thread testThread = new Thread(new TestRunner(ps, i == 49));
	public void test_OGNLService() throws Exception {
		PropertyService ps = new OGNLPropertyService();

		for (int i = 0; i < 50; i++) {
			Thread testThread = new Thread(new TestRunner(ps, i == 49));

The for loop in the MVEL test has 100 as limit while in the OGNL has only 50. And this complex
code to test the performance has some problem: if  you run it twice it will invert the winner.

> Replacing OGNL with MVEL
> ------------------------
>                 Key: CLK-306
>                 URL:
>             Project: Click
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 1.4
>         Environment: Target Click 1.5
>            Reporter: Bob Schellink
>            Assignee: Malcolm Edgar
>             Fix For: 2.4.0-RC1
>         Attachments: ASF.LICENSE.NOT.GRANTED--expression-language-performance.rar,,, patch.diff
> I have been following both OGNL and MVEL (another expression language) development the
last couple of months. If we are going to make changes to this here are some things you might
find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code enhancement. This
was added by one of the tapestry authors to make OGNL much faster than its reflection mode.
However in my testing 2.7.1 threw exceptions every now and then. So still buggy.
> * MVEL ( seems like a good replacement for OGNL. It has good
docs and is actively developed. They even fixed a bug I logged! Like OGNL, MVEL also runs
in two modes, either reflection or byte compiled. Unlike OGNL, MVEL's reflection mode is faster
than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's author), byte
code enhancement have some problems in that generated classes accumulate in java's perm space
and will only be removed when their classloader is removed.
> So MVEL in reflection mode looks like an ideal solution here. The power of OGNL with
the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to aggregate a total
for the row -> new Column("price * tax");

This message was sent by Atlassian JIRA

View raw message