multithreaded-download-manager
multithreaded-download-manager copied to clipboard
High CPU use
During the download, MDM extension take 25 -30 % of CPU use inside Firefox. In my opinion is too much. The rest is fantastic. Thanks.
This extension uses the StreamFilter API to receive the file from network. Unfortunately, data come in very small chunks with this API, so hundreds or thousands of chunks must be processed in the extension every second. I think this is the reason of the high CPU usage.
The chunk size of StreamFilter cannot be adjusted, and I do not know whether Firefox will add the feature to adjust it.
One possible solution is to use the Streams API instead of StreamFilter. This is an experimental technology that needs an about:config change in Firefox, and has some other problems last time I checked. I will see if this works better now.
Thanks for detailed info about this problem, I hope that Mozilla improve in the future this aspect. The minimal chunk size in the option is related to that?
No, that option controls the minimal remaining size that multiple connections will be created on. For example, If a download has two remaining "gaps" and each of them is just 10KB, it may be better to use 2 connections instead of 4, since creating a new connection costs time. The extension compares 10KB and the value of that option, and if 10KB is smaller than the value, only 1 connection will be created on each gap.
For me, the CPU usage can rack up to 80-90%. It solely depends on my internet speed. My internet speed can be up tot 2.5 megibytes/second. Usually my downloads are happening on my storage HDD, rarely on my SSD.
Usually two or more downloads are enough for my i5 6600 3.3GHz processor to choke upon. On some sites, the per connection speed is low, thus, I can do up to 8 downloads.
@brazenvoid I've got better performance than that on my laptop i5, but my download folder is on SSD. The only workaround I know is to switch to the unstable Streams API. I'll see if the crash problem is solved now.
The Streams API can be used in v2 (upcoming), but it only has little improvements on CPU usage (~30% to ~25% during a fast download test on laptop i7).
The Streams API can be used in v2 (upcoming), but it only has little improvements on CPU usage (~30% to ~25% during a fast download test on laptop i7).
Is better than nothing. :-) I see just now the new version 2.0..... Thanks.