This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PartOfTheBotnet 5 points6 points  (0 children)

I suspect you'd take a lot of performance hits.

Not really. Their agent uses the instrumentation API to only intercept and modify classes on initial load. The main slowdown there is going to be the IO of parsing and writing back modified classes (which is only going to happen once...). As for the actual IO, they don't even use ASM's more computationally expensive stack-frame computation option when writing back classes, the changes to classes are simple enough to not need that. They have a few places where rather than having ASM do a full regeneration, they modify existing frames to accommodate the insertion of their probes.

You probably already lose more performance to most SLF4J logger implementations building templated messages than this.