History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JANINO-120
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Arno Unkrig
Reporter: Matt Fowles
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Janino

Janino Compiler Needs Optimizing

Created: 06/Jun/08 02:06 PM   Updated: 16/Jun/08 09:27 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.15

Time Tracking:
Not Specified

File Attachments: 1. Text File fieldcache.patch (5 kb)



 Description  « Hide
On large projects the janino compiler is orders of magnitude slower than javac. It would be nice to optimize this a bit.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Matt Fowles - 06/Jun/08 02:07 PM
Profiling identified field look up as one of the larger hotspots in the code. The attached patch uses a map to find fields instead of looping through all of the fields.

Matt Fowles - 06/Jun/08 02:08 PM
UnitCompiler.findLocalVariable is also a hot spot, but I have not been able to find a clean way to optimize that yet.

Arno Unkrig - 14/Jun/08 03:00 PM
Hi there,

me too spent a lot of time thinking about "findLocalVariable()". Optimizing the "inner" "findLocalVariable()" doesn't help because you rarely declare more than a few variables in one LVDS. Bummer.


Arno Unkrig - 14/Jun/08 03:03 PM
Applied the patch. Please test!

If everything's OK, close this issue; otherwise "repoen". (Status "resolved" means that you have to work on this issue.)


Matt Fowles - 14/Jun/08 03:06 PM
Thanks for the update. I am in the middle of a slightly larger rework for findLocalVariable() that will make BlockStatements contain a cache of local variables in their scope, with maximal sharing of these caches between statements. I will open a new ticket for that when I finish it.

Arno Unkrig - 14/Jun/08 03:22 PM
Admittedly, your response time is faster than mine

Arno Unkrig - 14/Jun/08 03:23 PM
Yep, opening a new ticket is the right way of doing it. (No chained issues...)

Matt Fowles - 16/Jun/08 09:27 AM
Arno, I do not have the ability to close this issue. I think my login to Jira does not have the power. You can consider this closed.