Ask HN: Would you use continuous profiling to help refactor code?
Hi HN! I'm the creator of a piece of Java software that I want to improve the performance and readability of. I have a fairly good test coverage to ensure that the software continues to run correctly, but I now want to refactor the code to:
* Make it easier to read and maintain * Make it faster
For the second goal, I have relied heavily on continuous profiling tools, particularly Glowroot and Pyroscope, but I seem to have exhausted the gains I'm getting from these tools.
Flame graphs seem to hide information about how the code actually runs, such as how many times a function was called, so I started thinking about what information could help me take the next steps. The current, very hacky output combines interactive charts that let the user explore and step through a complete snapshot profile of a unit test. I'm also looking to include techniques from social network analysis to identify significant and potentially problematic code paths.
I can't help but think that these techniques could be packaged into a useful product, but rather than following my usual M.O. of building first and showing later, I figured I could ask here first:
1. Would you be interested in a service where you could send profiles of your code to help you make it faster and easier to read?
2. Do you think that showing profiler data as an interactive graph that shows relationships between function, classes and packages, together with statistics, could be a useful technique to identify how code can be refactored?
3. Does this already exists? I have looked, but can't seem to find it. OpenTelemetry seems to be getting a lot of focus, but I haven't seen a collector/analysis app that does what I would like to do
Thanks!
No comments yet.