Janino

Janino Compiler Needs Optimizing

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.5.15
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

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

Activity

Hide
Matt Fowles added a comment -

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.

Show
Matt Fowles added a comment - 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.
Hide
Matt Fowles added a comment -

UnitCompiler.findLocalVariable is also a hot spot, but I have not been able to find a clean way to optimize that yet.

Show
Matt Fowles added a comment - UnitCompiler.findLocalVariable is also a hot spot, but I have not been able to find a clean way to optimize that yet.
Hide
Arno Unkrig added a comment -

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.

Show
Arno Unkrig added a comment - 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.
Hide
Arno Unkrig added a comment -

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.)

Show
Arno Unkrig added a comment - 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.)
Hide
Matt Fowles added a comment -

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.

Show
Matt Fowles added a comment - 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.
Hide
Arno Unkrig added a comment -

Admittedly, your response time is faster than mine

Show
Arno Unkrig added a comment - Admittedly, your response time is faster than mine
Hide
Arno Unkrig added a comment -

Yep, opening a new ticket is the right way of doing it. (No chained issues...)

Show
Arno Unkrig added a comment - Yep, opening a new ticket is the right way of doing it. (No chained issues...)
Hide
Matt Fowles added a comment -

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.

Show
Matt Fowles added a comment - 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.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: