Improving performance has always been dependent on the ability to get relevant data or test cases to analyze. The self profiling improved this a lot, in many cases it's enough to have a profiling snapshot from the user and it's not necessary to reproduce the problem (which is often very difficult). This was a real breakthrough, however, there are still many problems that are difficult to reproduce even for the users who face them. If the problem happens randomly there may be no good moment to start self-profiling, or it may not even start when the IDE is blocked on 100% CPU. Also not everyone takes the effort to start over, repeat the problem, create snapshot, send it. It can be seen on the fact that vast majority of snapshots we receive are from the automatic slowness detector (which detects only specific types of problems), compared to snapshots created and sent manually.
It would be much easier for users to provide performance data if they could just create a snapshot retrospectively when they see a performance problem. This would require some kind of permanent sampling running all the time, keeping data for last 5 minutes (for example). So at any moment profiling data would be available for a post-mortem analysis, the user would not have to reproduce the problem again with self-profiling. The sampling method introduced in 6.9 has quite low overhead to make this possible.
For analyzing the snapshots this would require some additional features in profiler. The user would send the complete 5 minutes NPSS snapshot that would be too large to analyze in the classic CPU view with aggregated call trees. The tree view can be used only for certain time period that needs to be identified first. There could be some kind of "time line" view with possibility to select the relevant time interval and see it as the call tree. Possibly also with labels from gesture collector to make it easier to identify the user actions on the time line.
Tasks: Permanent Profiling
- TH: Throw away old data (older than ~5min)
- Modify Self Profile Action to trigger send via UI Gestured Collector
- Ensure people understand the possibility of permanent profiling (UI).
- TH: Share single thread dump between all currently running samplings
- Overlay data with java.util.logging.XMLFormater format
- Special understanding for UI Gestures Collector enhancements
- What data to represent for stacktraces?
- Start with simplest to implement, run usability study then
- Select part of timeline, generate regular snapshot from it
Tasks: Open All
- http://statistics.netbeans.org needs to generate either:
- descriptor with URLs
- one bundle with everything (stacktraces, XML gestures)
- npss file with additional URLs (to gestures XML)
- Maximum acceptable performance regression when instant profiling is on must not exceed 10%