Changeset 881

Show
Ignore:
Timestamp:
2008-03-12 23:08:06 (10 months ago)
Author:
MaierMan
Message:

#613: Multiple "slow-down" reports.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/chrome/content/dta/manager/prefs.js

    r801 r881  
    120120                        this.tempLocation = null; 
    121121                } 
    122                 var conns = (this.maxInProgress * this.maxChunks + 2) * 2; 
    123                 ['network.http.max-connections', 'network.http.max-connections-per-server', 'network.http.max-persistent-connections-per-server'].forEach( 
    124                         function(e) { 
    125                                 if (conns > Preferences.get(e, conns)) { 
    126                                         Preferences.set(e, conns); 
    127                                 } 
    128                                 conns /= 2; 
    129                         } 
    130                 ); 
     122                var conns = Math.floor((this.maxInProgress * this.maxChunks) * 1.5) + 2; 
     123                if (conns > Preferences.get('network.http.max-persistent-connections-per-server', conns)) { 
     124                        Preferences.set('network.http.max-persistent-connections-per-server', conns); 
     125                } 
    131126        } 
    132127} 
  • branches/1.0.x/components/migrationService.js

    r499 r881  
    9797                                this._execute(['Prefs', 'DropDowns', 'Filters', 'Remove']); 
    9898                        } 
     99                        if (vc.compare(lastVersion, "1.0.1") < 0) { 
     100                                this._execute(['ResetMaxConnections']); 
     101                        }                        
    99102        var params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"] 
    100103                                .createInstance(Components.interfaces.nsIDialogParamBlock); 
     
    182185        }, 
    183186         
     187        // 1.0.1: #613 Multiple "slow-down" reports 
     188        _migrateResetMaxConnections: function() { 
     189                DTA_debug.dump("resetting connection prefs"); 
     190                ['network.http.max-connections', 'network.http.max-connections-per-server', 'network.http.max-persistent-connections-per-server'].forEach( 
     191                        function(e) { 
     192                                DTA_preferences.reset(e); 
     193                        } 
     194                ); 
     195        }, 
     196         
    184197        // pre 1.0: migrate Filters 
    185198        _migrateFilters: function MM_migrateFilters() {