mirror of
https://github.com/transmission/transmission
synced 2025-02-12 09:25:03 +00:00
speedups found by chrome's profiler
This commit is contained in:
parent
65ad4fbcb9
commit
4b16ef8896
2 changed files with 6 additions and 13 deletions
|
@ -63,10 +63,12 @@ TorrentRendererHelper.renderProgressbar = function(controller, t, progressbar)
|
|||
var e;
|
||||
e = progressbar.complete;
|
||||
e.style.width = '' + info.percent + "%";
|
||||
e.className = info.complete;
|
||||
if (e.className !== info.complete)
|
||||
e.className = info.complete;
|
||||
e.style.display = info.percent<=0 ? 'none' : 'block';
|
||||
e = progressbar.incomplete;
|
||||
e.className = info.incomplete;
|
||||
if (e.className !== info.incomplete)
|
||||
e.className = info.incomplete;
|
||||
e.style.display = info.percent>=100 ? 'none' : 'block';
|
||||
};
|
||||
|
||||
|
|
|
@ -1502,7 +1502,6 @@ Transmission.prototype =
|
|||
|
||||
this.setPref(Prefs._ShowInspector, true);
|
||||
this.updateInspector();
|
||||
this.refreshDisplay();
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -1523,7 +1522,6 @@ Transmission.prototype =
|
|||
}
|
||||
|
||||
this.setPref(Prefs._ShowInspector, false);
|
||||
this.refreshDisplay();
|
||||
},
|
||||
|
||||
refreshMetaData: function(ids) {
|
||||
|
@ -1672,12 +1670,6 @@ Transmission.prototype =
|
|||
}
|
||||
},
|
||||
|
||||
refreshDisplay: function()
|
||||
{
|
||||
for (var i=0, row; row=this._rows[i]; ++i)
|
||||
row.render(this);
|
||||
},
|
||||
|
||||
/*
|
||||
* Set the alternating background colors for torrents
|
||||
*/
|
||||
|
@ -2013,7 +2005,7 @@ Transmission.prototype =
|
|||
if (!this.refilterTimer)
|
||||
{
|
||||
var tr = this;
|
||||
this.refilterTimer = setTimeout(function() {tr.refilter();}, 200);
|
||||
this.refilterTimer = setTimeout(function() {tr.refilter();}, 500);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -2057,7 +2049,7 @@ Transmission.prototype =
|
|||
fragment.appendChild(row.getElement());
|
||||
rows.push(row);
|
||||
}
|
||||
$('ul.torrent_list li').remove();
|
||||
$('ul.torrent_list').empty();
|
||||
delete this._rows;
|
||||
this._rows = rows;
|
||||
this._torrent_list.appendChild(fragment);
|
||||
|
@ -2067,7 +2059,6 @@ Transmission.prototype =
|
|||
this.updateStatusbar();
|
||||
if (sel.length !== new_sel_count)
|
||||
this.selectionChanged();
|
||||
this.refreshDisplay();
|
||||
this.refreshFilterButton();
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue