paljsingh / impartus-downloader

Download Impartus lectures, convert to mkv for offline viewing.
GNU General Public License v3.0
23 stars 8 forks source link

[Bug]: High cpu usage on idle window. #97

Open paljsingh opened 3 years ago

paljsingh commented 3 years ago

CPU usage goes up to 50% and above on an idle window. The issue occurs after a downloaded video is processed, during which the app shows spin icon. The spin icon triggers an update with a default 10ms interval, and it seems it keeps updating even after the qta icon is replaced with another icon. With more than one downloads, the spinning icon updates start using a lot of cpu and the usage goes often above 50-60%

paljsingh commented 3 years ago

fixed with commit id: 14014b0 For now, increasing the interval value.

Need to find a way to provide stop criteria for the spin/update, or delete / garbage collect the unused icon once it is no longer required.

paljsingh commented 3 years ago

tracking bug for qtawesome spin icon issue... https://github.com/spyder-ide/qtawesome/issues/165

Takla101 commented 2 years ago

Please fix high cpu usage issue My pc cpu usage went over 90% and was unable to multi-task on another window Can you make changes to slow the process Or find another solution 😁

paljsingh commented 2 years ago

Please fix high cpu usage issue My pc cpu usage went over 90% and was unable to multi-task on another window Can you make changes to slow the process Or find another solution 😁

Can you provide more details on the scenario when you saw the cpu spike? 1) Does it spike only when processing the videos, and subside once the processing it complete. Or remain high even after the videos are processed ? 2) If seeing high usage on idle window (i.e. no videos being processed), does it show high cpu even before downloading anything, or only after downloading/processing some N number of videos. 3) A snapshot of the task manager to confirm if it is indeed the python app causing high cpu usage.

The fix in commit id 68f2b02 already fixes the idle window usage caused by the spin icons / timers (though, in not the most ideal way), so I hope there could be some other issue here.

Takla101 commented 2 years ago

it had spike at the time of processing of lecture and also during downloading in the disk usage section although in my older pc it jumped to 80-90% can you fix this high cpu usage problem by increasing the time of processing

Screenshot (3)

paljsingh commented 2 years ago

I've opened a new bug #108 and added a fix for it. Can you try with the code from this branch -