-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huge performance gap due to reading unnecessary metadata #515
Comments
I believe the purpose of the YAML was to provide extra data about the checks being presented in the metadata. I was not really involved in it's planning and development, but @romani should be able to confirm. https://github.com/sevntu-checkstyle/sevntu.checkstyle/blob/master/eclipsecs-sevntu-plugin/src/com/github/sevntu/eclipse-metadata.yml
There are issues with sevntu since 8.36.1 and an issue has been sitting for a while. I tried providing fixes for the issue, but I believe my PRs were reverted because of some issues with the changes.
Just so your aware, main Checkstyle does the same scanning when it needs to find a module that is not the FQCP and is not one of Checkstyle's main modules (shorthand or full name) ( https://checkstyle.org/checks.html ). ==== Your picture cuts off on how far down specifically the slowdown goes. I am curious if the specific call is something from CS or is connected to the YML. If it is |
I though that all thirparty providers need to provide such details for eclipse-cs: If we can optimize something wihtout loosing functionality - I am agree. Looks like this yml was only for decaration purposes - sevntu-checkstyle/sevntu.checkstyle#822 If we see way to improve, lets do this. |
* don't scan the com.* package hierarchy * calculate the common root packages of all known packages with checks and metadata instead * scans only the ...puppycrawl... and net.fs...samplechecks packages in a default developer runtime now fixes checkstyle#515
#242 introduced some eclipse-metadata.yml. To my understanding that is not needed at all. AFAIK only the sevntu checks have that yaml file in their jar (because it was introduced with that PR). And even there it's not needed, because the sevntu modules are perfectly found and displayed by the normal checkstyle-metadata. Deleting that yaml related code doesn't make any difference for me. (I've debugged the entire metadata loading with the sevntu eclipse plugin in my workspace, and I can configure and execute them as before).
At the same time, scanning all classes on the classpath for those yaml files takes an eternity and is the main responsible for the slow initialization of metadata on first access to any rule (remember #375). Below image shows this taking 27.8 seconds of CPU time on my performance laptop.
Am I missing anything about those yaml files or can we really just get rid of this?
The text was updated successfully, but these errors were encountered: