impartus-downloader icon indicating copy to clipboard operation
impartus-downloader copied to clipboard

[Bug]: High cpu usage on idle window.

Open paljsingh opened this issue 4 years ago • 6 comments

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 avatar Jul 12 '21 09:07 paljsingh

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 avatar Jul 12 '21 09:07 paljsingh

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

paljsingh avatar Jul 12 '21 14:07 paljsingh

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 😁

Takla101 avatar Oct 31 '21 18:10 Takla101

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.

paljsingh avatar Nov 01 '21 09:11 paljsingh

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)

Takla101 avatar Nov 03 '21 17:11 Takla101

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

  • Download zip from the following link: https://github.com/paljsingh/impartus-downloader/archive/refs/heads/configurable-priority.zip

  • Extract zip

  • Copy ffmpeg.exe to the folder where zip is extracted

  • in etc/impartus.conf, change external_process_priority: normal to external_process_priority: lowest

  • Run python3.exe App.py

  • Download a video and monitor the CPU in task manager.

paljsingh avatar Nov 08 '21 04:11 paljsingh