Commit Graph

6 Commits

Author SHA1 Message Date
Felix Fung
42b50d5d59 Bug 397424 - Downloads cause high CPU usage. r=gavin
This addresses an issue with the download manager that can cause high CPU usage
when there is an active download.  The underlying issue is the frequency of
updates that the download progress listener receives.
Things changed:
- reduced the number of null checks in DownloadUtils.jsm's getDownloadStatus
  function by one (down to two from three).
- obtain and format strings from the nsIStringBundle.  This removes all the
  calls to String.replace in DownloadUtils.jsm.
- modifies the download manager back-end to update the percentComplete and size
  property on downloads before dispatching a state changed notification for
  downloads entering the DOWNLOAD_DOWNLOADING state.  This saves us two calls to
  setAttribute on downloads that we know how big they are, and saves us the same
  two calls to setAttribute for indeterminate downloads as well as not
  dispatching a ValueChange event on the progressmeter every time
  onProgressChange is called on the DownloadProgressListener.
- has nsDownload implement nsIClassInfo so we do not need to QueryInterface when
  going through the list of active downloads in both the download manager's UI
  and the browser's taskbar UI.
2011-11-03 15:25:55 -07:00
Paolo Amadini
62418fc17d Bug 653261 - Add a function to format the date and time displayed in the Download Manager. r=sdwilsh sr=mconnor 2011-07-27 13:08:24 +02:00
Anas Husseini
42ee99da17 Bug 462064 - Download manager shows decimal digit for bytes when file below 100 bytes. r=edilee,sdwilsh a=mossop 2011-02-08 18:33:18 +01:00
Philipp von Weitershausen
8fa2a3f016 Bug 597852 - Internationalize decimal separator in Download Manager. r=Mardak a=beltzner 2010-10-08 17:57:04 +02:00
Michael Kohler
6c0f59f4a6 Bug 506041 Part 2: Correct misspellings in source code
r=timeless
2010-05-13 14:19:50 +02:00
Mitchell Field
81469fca2d Bug 461444: remove cases of excessive recursion in makefiles r=ted
--HG--
rename : toolkit/mozapps/downloads/src/DownloadLastDir.jsm => toolkit/mozapps/downloads/DownloadLastDir.jsm
rename : toolkit/mozapps/downloads/src/DownloadUtils.jsm => toolkit/mozapps/downloads/DownloadUtils.jsm
rename : toolkit/mozapps/downloads/src/nsHelperAppDlg.js.in => toolkit/mozapps/downloads/nsHelperAppDlg.js
rename : toolkit/mozapps/extensions/src/LightweightThemeManager.jsm => toolkit/mozapps/extensions/LightweightThemeManager.jsm
rename : toolkit/mozapps/extensions/src/nsAddonRepository.js => toolkit/mozapps/extensions/nsAddonRepository.js
rename : toolkit/mozapps/extensions/src/nsBlocklistService.js => toolkit/mozapps/extensions/nsBlocklistService.js
rename : toolkit/mozapps/extensions/src/nsExtensionManager.js.in => toolkit/mozapps/extensions/nsExtensionManager.js
rename : toolkit/mozapps/extensions/public/nsIAddonRepository.idl => toolkit/mozapps/extensions/nsIAddonRepository.idl
rename : toolkit/mozapps/extensions/public/nsIExtensionManager.idl => toolkit/mozapps/extensions/nsIExtensionManager.idl
rename : toolkit/mozapps/handling/src/nsContentDispatchChooser.js => toolkit/mozapps/handling/nsContentDispatchChooser.js
rename : toolkit/mozapps/shared/src/CertUtils.jsm => toolkit/mozapps/shared/CertUtils.jsm
rename : toolkit/mozapps/shared/src/FileUtils.jsm => toolkit/mozapps/shared/FileUtils.jsm
2010-01-27 11:16:53 -08:00