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
[feature] Don't consume CPU when idle #2030
Comments
@aj3423 this is not normal behavior. |
@skylot I can confirm the CPUs goes very high after global searching, and it goes down back if the window goes to background or even being resized. This happens with any apk, the attached is a helloworld apk generated by android studio, same problem. To reproduce:
Don't know if it's os specific, I'm on Fedora 38 XFCE. Jadx was built from the latest source:
|
I switched to KDE from XFCE, the problem still exists. Sometimes the cursor is changing all the time while high CPU. V_20231022_084511_ES3.mp4 |
@aj3423 sorry, but I can't reproduce this issue 🙁 Anyway, I will keep this issue open for some time, maybe someone else can reproduce and fix this issue. |
@skylot Neither hiding memory bar nor changing java version works. But I tried changing the theme, seems the problem is gone as long as I use the default them, and if I choose any other theme, the CPU goes high again. |
@aj3423 this means that FlatLaf causing this issue, or jadx uses it incorrect 🙁 |
I've analyzed the problem in FlatLaf Demo. I'm not sure whether the problem in jadx is the same as in FlatLaf Demo. @aj3423 could you capture some thread dumps of jadx (while CPU load is high)? |
@DevCharly Here are 10 logs captured with |
All 10 logs show that jadx is repainting all the time... In the meantime I was able to reproduce the issue (on Win11 and on Ubuntu). @aj3423 have you enabled line wrapping? In the debugger I see that one of the tabbed panes is recalculating layout while repainting, which seems to cause a new repaint, which results in endless relayout and repaint... Don't know the exact reason. Since FlatLaf 3.2.2, this seems to be "fixed". @aj3423 please use latest jadx commit. |
@DevCharly thanks! Indeed, with line wrapping enabled, I am also able to reproduce this issue. Although I also need to make jadx window inactive, and after I focus window again CPU load goes up. |
@DevCharly Indeed it's the LineWrap causing the CPU problem, after disabling it, the CPU never goes up again. |
…d tabbed panes (top and bottom tab placement) and RSyntaxTextArea (with enabled line-wrapping) as tab content (see skylot/jadx#2030) instead of using `BasicTabbedPaneUI.TabbedPaneLayout.layoutContainer()`, now layouting all components ourself and avoid double moving/resizing of some components
fixed with latest FlatLaf Could you test that snapshot? Thanks. |
@DevCharly issue fixed for me 🎉 Thank you 👍 |
Fixed by updating FlatLaf to version 3.3. |
Describe your idea
It seems there is a background job running all the time, it consumes CPU. And the memory usage on the bottom bar changes all the time.
I saw from other thread that it's indexing. But I have already opened files I need, just want to stay at that page and spend some time reading the source, no more indexing is necessary.
Is it possible to disable this background job with an option in preference?
Thanks.
The text was updated successfully, but these errors were encountered: