Col-E / Recaf

The modern Java bytecode editor
https://recaf.coley.software
MIT License
5.99k stars 463 forks source link

cpu usage increasing to 99.9% with recaf 3 #541

Closed ssheera closed 2 years ago

ssheera commented 2 years ago

Describe the bug

When I virtualize or optimize (not 100% sure this causes it) the CPU usage of the application will increase by like 10% and stay there, an example being before I do anything it is 8% and after reaches 20% average and would keep increasing every time I did it

To Reproduce

Steps to reproduce the behavior:

  1. Open Sample
  2. Open class
  3. Right click on method name and run it using ssvm

Screenshots image CPU usage after trying to run a method a couple times, was originally around 8 but rose to 30 and didn't go back down

ssheera commented 2 years ago

I realised it wasn't ssvm but recaf itself, after a few mins of using it becomes unusable and cpu is at 99%

Col-E commented 2 years ago

but recaf itself

I can't seem to reproduce this. Recaf 3X for me usually goes back down to ~10% usage idle. Here's a graph of CPU usage: image

Col-E commented 2 years ago

Try the newest release out: https://github.com/Col-E/recaf-3x-issues/releases/tag/3.0.0-SNAPSHOT-13

Specifically, this commit should fix these higher than expected idle percentages. Root cause was a damn progress bar I added to make the decompile waiting screen look nicer... 💢 - https://bugs.openjdk.org/browse/JDK-8200239

New CPU chart: image

Spikes are only around when a larger class is being decompiled.

ssheera commented 2 years ago

Thanks this is a lot better