BlueBoxWare/LibGDXPlugin

Parsing of .skin files (or JSON's treated as so) causes extreme CPU usage

cosmicdan opened this issue · 4 comments

Great plugin, but with just the plugin enabled - no LibGDX inspections enabled - often the inspection highlights (i.e. warnings) as you type are not updated after performing changes.

It happens for example if you copy the Scene2d Label class into a new one and start refactoring/cleaning it up. Before:

image

After applying quick fix:

image

... quick fix is done, there are no more suggested quick fixes - but the editor keeps it highlighted. Just an example, happens with any warning for my inspection profile.

Tried the usual - giving IDEA more RAM, clearing caches, etc. For now ill just have to have the plugin disabled :( and enable it periodically for project inspections.

Just to clarify: disabling the plugin solves the realtime inspections immediately.

UPDATE: just having this class open with LibGDX plugin enabled maxes out 1 to 2 cores on my CPU (20-40% usage) and doesn't go down!. After disabling the plugin and restarting, idle CPU usage goes back down to 0-1%.

I had a similar issue with the plugin maxing out one of my CPU cores when I press "Yes" on the prompt that says "This looks like a libGDX Skin. Should this file be handled like a Skin file instead of a regular JSON file?"

image

I had a similar issue with the plugin maxing out one of my CPU cores when I press "Yes" on the prompt that says "This looks like a libGDX Skin. Should this file be handled like a Skin file instead of a regular JSON file?"

image

THANK YOU for your info! This is indeed the problem - I renamed my .skin to .json instead so it wouldn't treat it as a skin automatically, and sure enough this troublesome class is no longer taxing my CPU.

So, obviously there's an issue with .skin handling. At least I can use the inspections and gutter colors and such now though, so TY for the tip on the work-around!

This should be fixed now. Although the performance with skin files is still not great, at least for large ones. I'll need to see if I can improve that.