asual / lesscss-engine

LESS Engine - A Java wrapper for less.js
http://www.asual.com/lesscss
Apache License 2.0
220 stars 66 forks source link

Perf : why is the Rhino call() synchronized ? #42

Closed laurentperez closed 11 years ago

laurentperez commented 11 years ago

Hi

I'm worried about the private synchronized String call(Function fn, Object[] args) in https://github.com/asual/lesscss-engine/blob/master/src/main/java/com/asual/lesscss/LessEngine.java

IIUC, the Rhino call uses a ThreadLocal Context, so I believe the synchronized is useless and leads to a blocking compile.

Is there a reason for the synchronized ? I'd like to use the same LessEngine instance for all the compiles

thanks