Compare commits
No commits in common. "22356864c374fd562f5305f5e15fd8b2120bd7dc" and "4bf159eda2ee7218479407c1a5f48ac753dcff63" have entirely different histories.
22356864c3
...
4bf159eda2
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "multi-hoster-uploader",
|
"name": "multi-hoster-uploader",
|
||||||
"version": "3.1.7",
|
"version": "3.1.6",
|
||||||
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -918,23 +918,6 @@ function scheduleThrottledUIUpdate() {
|
|||||||
}, UI_UPDATE_INTERVAL);
|
}, UI_UPDATE_INTERVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Coalesces status-change updates (done/error/retrying/queued/…) into one
|
|
||||||
// frame. Without this, a batch of 500 jobs flipping queued→getting-server
|
|
||||||
// →uploading synchronously fires 1500+ updateStatusBar/Buttons/Stats calls
|
|
||||||
// and janks the renderer. rAF caps it to ~60 Hz.
|
|
||||||
let _statusChangeUpdateQueued = false;
|
|
||||||
function scheduleStatusChangeUpdate() {
|
|
||||||
if (_statusChangeUpdateQueued) return;
|
|
||||||
_statusChangeUpdateQueued = true;
|
|
||||||
requestAnimationFrame(() => {
|
|
||||||
_statusChangeUpdateQueued = false;
|
|
||||||
renderQueueTable();
|
|
||||||
updateQueueActionButtons();
|
|
||||||
updateStatusBar();
|
|
||||||
updateStatsPanel();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildRowHtml(job) {
|
function buildRowHtml(job) {
|
||||||
const statusClass = `status-${job.status}`;
|
const statusClass = `status-${job.status}`;
|
||||||
const rowClass = `queue-row ${statusClass}${selectedJobIds.has(job.id) ? ' selected' : ''}`;
|
const rowClass = `queue-row ${statusClass}${selectedJobIds.has(job.id) ? ' selected' : ''}`;
|
||||||
@ -1876,13 +1859,14 @@ function handleProgress(data) {
|
|||||||
queueJobs = queueJobs.filter(j => j !== job);
|
queueJobs = queueJobs.filter(j => j !== job);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status changes (done/error/etc) get one coalesced update per frame so a
|
// Status changes (done/error/etc) get immediate render; ongoing progress is throttled
|
||||||
// burst of 500 parallel jobs flipping state doesn't fire 2000 sync DOM
|
|
||||||
// updates. Ongoing uploading progress is throttled at 200ms.
|
|
||||||
if (data.status === 'uploading') {
|
if (data.status === 'uploading') {
|
||||||
scheduleThrottledUIUpdate();
|
scheduleThrottledUIUpdate();
|
||||||
} else {
|
} else {
|
||||||
scheduleStatusChangeUpdate();
|
scheduleQueueRender();
|
||||||
|
updateQueueActionButtons();
|
||||||
|
updateStatusBar();
|
||||||
|
updateStatsPanel();
|
||||||
}
|
}
|
||||||
persistQueueStateSoon();
|
persistQueueStateSoon();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user