Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core Framework
Submitted By: J.C. Hamlin (jchamlin)
Assigned to: Nobody/Anonymous (nobody)
Summary: Checkstyle on Enterprise Code and Multi-Core Processors
The performance of Checkstyle on our project is not acceptable. It raises the build time in Eclipse from 9 minutes to over 20 minutes when it is turned on.
Windows 7 Enterprise 64-bit
Java 1.6.0_31 64-bit
MyEclipse 9.1 64-bit (based on Eclipse 3.6)
Checkstyle Plugin version 220.127.116.11111092104
Workstation: 12GB RAM, W3680 processor (12 cores at 3.33GHz)
We have about 30 projects, 29 smaller ones which Checkstyle runs on quickly, but the largest is 984 packages, 9526 source files, 11,753 classes, 1,634,770 lines of code and uses 180 third-party jar files and it takes Checkstyle about 10 minutes to analyze that project. During the time Checkstyle is analyzing it the CPU utilization is around 8-10% so Checkstyle is using only one core of twelve cores.
When Checkstyle is enabled, it will build in sequence, and add over 10 minutes to the total build time in Eclipse (changing it from 9 minutes to over 20 minutes).
While it was analyzing the big project, it was using only 1/12th of the available horsepower (1 of 12 cores) of the workstation it was running on. When multiple-cores are available, Checkstyle needs to make use of multiple cores in order to reduce the time it takes to analyze large projects. We want Checkstyle on for all builds, and it should use all 12 cores available to it to reduce the analysis time.
Comment By: Stephen (scooper)
Date: 2012-07-16 13:56
I've created a patch for this.
I'm not very happy with the patch because it uses a static ThreadLocal for
the LocalizedMessages, but the alternative of passing in the
LocalizedMessages to all the methods which needed it was very invasive.
I'll leave the decision of changing the method signatures to the maintainer
of this project.
I don't see how to attach a file. I'll poke around. Otherwise I'll post a
link where the patch can be downloaded.