cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Georg Hüttenegger" <>
Subject Performance Issue / Class Loading by Rhino
Date Mon, 12 Dec 2005 11:57:51 GMT

after doing some profiling and analysis I have found that rhino is doing a
lot of class loading which often fails. This is coming from / getPkgProperty (a lot of ClassNotFoundException
exceptions are thrown and catched there). This stems from references in a
flow script to Java classes, ...

Although there is a cache this does not prevent a lot of class loading
(failing most of the time) for each new request (until the cache is filled
anew). The originating call is in ContinuationInterpreter

I am not sure how a real fix of this problem would look like. Nevertheless,
I have made a naive fix for the problem (patch attached) that simply adds a
cache to NativeJavaPackage. This resolved the issue for my test scenario and
resulted in a great performance increase.

When looking at the initial code I think there could be a more elegant
solution (that does not need a "secondary" cache). Furthermore, I am not
sure if my "quick fix" has side effects or not (e.g. when a huge number of
classes is referenced of one and the same package).

Has anybody else already encountered this issue and found a different
solution? What do you think of my solution? Any other ideas / comments?


Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner:
View raw message