I am encountering an issue with the profiler in Helma, and as I
believe the two projects share the code for profiling and RingoJS
receives more attention I am posting about it here.
The problem I encounter has to do with recursion. When I have a
function that recursively calls itself, its runtime is added up so the
time spent inside the function ends up being counted more than once
(as many times as the function was called within the first call). The
result is that I get functions / frames that list a total time of more
than the actual execution time of the request, in my case sometimes 5
- 10 times the amount, so it is rather confusion to make something of
I am happy to fix this but wonder what the expected behaviour should
The answer is to add profiling for self-time, which means only timing
instructions executed within one method, but not other methods called
from there. I guess we really want to do this in Java then instead of
JS as it adds quite a bit more overhead than plain method timing.
I think I'll eventually implement this, but don't expect me to back-
port this to Helma. You should really start using Ringojs, by the way!
Wait, I actually implemented self-timing a long time ago.
For whatever reason, it just isn't used in the profiler output.
I agree that self-timing is ideally what one would want, and I guess I
could look into how you implemented that in RhinoJS, but this fix is
enough or me right now. Are you interested in having it in Helma? I
could write a patch.
As for switching over, if I would start from scratch now I would love
to, but I have a full blown CMS framework implemented on top of Helma,
that irons out most of its quirks, and a row of websites running on it
that I keep maintaining. Right now I can neither afford nor find the
time to port it all over, and I keep using this framework for new
sites too, as it is a very convenient way for making sites quickly, so
I keep adding to the framework itself as well. As Helma will not
undergo any fundamental changes anymore I actually started modifying
its code according to my needs and consider forking it into a new
project. As it stands it just makes more sense for me this way.
If there was more compatibility between the two I would consider a
switch, as a compatibility layer would help with converting things
over slowly, but right now there just seems no way to do so that would
not require 100% of my time for at least a few months, which is a bit
I wonder if I am the only one from the old Helma crowd to think like
this? Maybe I am overestimating the work involved? I would love to
hear experiences from others.
RhinoJS? http://ringojs.com/bot/rhinojs ;-)