Compare commits
2 Commits
0df8557f06
...
79fe41c774
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79fe41c774 | ||
|
|
678c9ce3c5 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "multi-hoster-uploader",
|
||||
"version": "3.3.3",
|
||||
"version": "3.3.4",
|
||||
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
@ -900,11 +900,17 @@ function scheduleRecentRender() {
|
||||
|
||||
// Toggle the .selected class on existing rows without rebuilding the table.
|
||||
// Used on click/selection changes — O(rendered rows) instead of O(total rows × sort).
|
||||
// Uses getElementsByClassName for the live HTMLCollection (DOM-cached after the
|
||||
// first call, auto-tracks insertions/removals on tbody) instead of running a
|
||||
// fresh querySelectorAll on every click. At 200 visible rows that's the
|
||||
// difference between paying for a tree walk per click vs reading a memoized
|
||||
// list that the engine already maintains.
|
||||
function applyQueueSelectionClasses() {
|
||||
const tbody = document.getElementById('queueBody');
|
||||
if (!tbody) return;
|
||||
const rows = tbody.querySelectorAll('.queue-row');
|
||||
for (const tr of rows) {
|
||||
const rows = tbody.getElementsByClassName('queue-row');
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
const tr = rows[i];
|
||||
tr.classList.toggle('selected', selectedJobIds.has(tr.dataset.jobId));
|
||||
}
|
||||
}
|
||||
@ -912,8 +918,9 @@ function applyQueueSelectionClasses() {
|
||||
function applyRecentSelectionClasses() {
|
||||
const tbody = document.getElementById('recentFilesBody');
|
||||
if (!tbody) return;
|
||||
const rows = tbody.querySelectorAll('.recent-file-row');
|
||||
for (const tr of rows) {
|
||||
const rows = tbody.getElementsByClassName('recent-file-row');
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
const tr = rows[i];
|
||||
const order = parseInt(tr.dataset.order, 10);
|
||||
tr.classList.toggle('selected', selectedRecentIds.has(order));
|
||||
}
|
||||
|
||||
@ -5,12 +5,10 @@
|
||||
- ✅ 3.3.1 — `removeFromQueueOnDone` coalesced via microtask (kein O(N²) mehr bei done-Bursts)
|
||||
- ✅ 3.3.2 — `fileuploader.log` Auto-Rotation bei 50 MB (max 3 Backups: .1 .2 .3)
|
||||
- ✅ 3.3.3 — `_jobLogCollector` Cap auf 1000 tracked jobs (FIFO-eviction beim Überschreiten)
|
||||
- ✅ 3.3.4 — `applyQueueSelectionClasses` + `applyRecentSelectionClasses` nutzen `getElementsByClassName` (live HTMLCollection statt querySelectorAll re-query bei jedem Klick)
|
||||
|
||||
## Open items (priorisiert)
|
||||
|
||||
### Performance
|
||||
- [ ] **`applyQueueSelectionClasses`** (renderer/app.js:891) — `tbody.querySelectorAll` bei jedem Klick. Bei 5000-Jobs-Queue O(N) per click. Cache last rendered range.
|
||||
|
||||
### Code-Qualität
|
||||
- [ ] **Test-Coverage für 3.3.0** — keine Tests für die queue-cap-prune-Logik in handleBatchDone, sortQueueJobs dynamic-throttle, log-error-recovery.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user