ddekany commented on PR #89:
URL: https://github.com/apache/freemarker/pull/89#issuecomment-1859230267

   No, it can't trace lambda-ish things, as it doesn't monitor expression 
evaluation at all. The tracer object only called before and after "elements", 
like directives, interpolations, a static text blocks. If it was called for 
each single expression AST node, I wouldn't feel convenient about that, because 
99.9...9% of users will not use this feature ever, but the extra `if (tarcet != 
null) { ... }` branch is there for everyone. Yes, you can be pretty sure that 
it's just speculatively skipped, and should have no practical performance 
impact, but still... who knows, both the JIT and the modern CPU-s are complex. 
And more importantly, since we only provide position information (and no more 
detailed semantics), it has limited value to go into ever more details. 
Probably what you care about on expression level is Java method execution 
speeds, but monitoring that is an `ObjectWrapper` concern.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to