Performance per inspection

已回答

I'd like to measure the performance per inspection somehow. Running inspections takes a lot of time. I'd like to know which ones are using most of the resources/are the slowest. How can this be achieved? Is there a way to profile inspections?

fyi - I ran into a similar question, but it is from 2007 (link), so instead of replying there I opened this new post.

0

hello. it depends on the definition of “the slowest”. given inspections A,B,C, the A could be the fastest in file x after editing line 2, but the slowest when editing line 4;  the B could be the fastest when the plugin y is enabled, the C could be the fastest in json-enabled project. The general solution doesn't exist here, but if you want to profile code in particular configuration/environment you can always use build-in IDEA profiler/YourKit/JProfiler etc profilers, profile the IDEA process for some time and then zoom in to the specific visit* method in the PsiElementVisitor created in com.intellij.codeInspection.LocalInspectionTool#buildVisitor(com.intellij.codeInspection.ProblemsHolder, boolean)

0

请先登录再写评论。