dooit-org / dooit

An awesome TUI todo manager
MIT License
2.1k stars 97 forks source link

[BUG] High CPU Usage #183

Open Hamadah2O2 opened 3 months ago

Hamadah2O2 commented 3 months ago

Describe the bug 🐛 Maybe a duplicate of 177. same issue, and perhaps some reasons from me. dooit seems always render the ui dirrectly, and causing high CPU usage.

To Reproduce 🐣 Steps to reproduce the behavior:

  1. Just install and dooit

Expected behavior 🤔 Low CPU usage on idle, or just render the ui on key pressed or mouse events .

~Screenshots~ Video 🧐 I am using alacritty on high verbosity level: DaVideo (Sorry for low quality 😞)

On idle, textual seems stop rendering the ui, waiting for mouse events and then render the ui. But dooit just always render and render and render the ui for live.

Desktop (please complete the following information): 🤖

Additional context 📝 This is annoying while working on a project, but the CPU is being devoured by dooit!

kraanzu commented 3 months ago

Holy moly...that is very slow Sorry for such an experience, this is really weird.

Yes dooit is trying to refresh a lot of widgets, its a poor design choice made by me and I'm fixing it right now

I don't think I'd be able to figure it out with this version, lets do this instead... I'll quicky try to replicate the minimal current user experience in a different branch and you can try that one out and see if this happens again? Might take a couple of days

Although I'm curious about the processor you're using, its launching very slow

Hamadah2O2 commented 3 months ago

Holy moly...that is very slow Sorry for such an experience, this is really weird. Although I'm curious about the processor you're using, its launching very slow

Don't worry, my processor runs at 1GHz, and do recording, causing it to launch veery slowly. During normal startup (without recording), it only takes 1.5 seconds (fast enough i think) ... Kayak nya saya harus beli pc baru. 😭

Yes dooit is trying to refresh a lot of widgets, its a poor design choice made by me and I'm fixing it right now

I don't think I'd be able to figure it out with this version, lets do this instead... I'll quicky try to replicate the minimal current user experience in a different branch and you can try that one out and see if this happens again? Might take a couple of days

My plessure 🙌🏽

kraanzu commented 3 months ago

Kayak nya saya harus beli pc baru. 😭

hahaha...actually I previously had a slow laptop and then I bought a brand new PC when I got an internship. The funny thing is, I made dooit slower without even realizing because for me it'd launch quickly enough to barely notice any changes

Side note: If you liked dooit, you might also like this: https://github.com/kraanzu/smassh plus, Can you see if this also has a high CPU usage problem?

Hamadah2O2 commented 3 months ago

Side note: If you liked dooit, you might also like this: https://github.com/kraanzu/smassh plus, Can you see if this also has a high CPU usage problem?

I like that too, I installed and used both dooit and smassh in the first time, which made me smash the keyboard every day. And smassh seems does not have a high CPU usage, runs fine, and takes 0 CPU usage when idle.

The funny thing is, I made dooit slower without even realizing because for me it'd launch quickly enough to barely notice any changes.

hahaha, if it works don't touch it 😄

kraanzu commented 3 months ago

And smassh seems does not have a high CPU usage, runs fine, and takes 0 CPU usage when idle.

Ok super nice to hear that. Then its probably due to a lot of widgets Fortunately, I'll be removing all of that and use only one widget for workspaces and todolists which also is very performant