Skip to content

improve load order page performance for large mod counts (LAZ-717)#23699

Open
IDCs wants to merge 3 commits into
masterfrom
fix/laz-717
Open

improve load order page performance for large mod counts (LAZ-717)#23699
IDCs wants to merge 3 commits into
masterfrom
fix/laz-717

Conversation

@IDCs

@IDCs IDCs commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Virtualize the file-based load order list (via a standalone ListWindow helper) and cut the per-drag work that made dragging unusable with 1000+ entries: stable react-dnd collector, memoized rows, precomputed row position/locked-count, id-indexed UpdateSet lookups.

Debounce the BG3 auto-export and heal stale pak-cache mod links so managed mods stop showing as "Not managed by Vortex". Add an opt-in uniformRowHeight flag for custom-renderer games to virtualize.

closes LAZ-717

Virtualize the file-based load order list (via a standalone ListWindow
helper) and cut the per-drag work that made dragging unusable with 1000+
entries: stable react-dnd collector, memoized rows, precomputed row
position/locked-count, id-indexed UpdateSet lookups.

Debounce the BG3 auto-export and heal stale pak-cache mod links so
managed mods stop showing as "Not managed by Vortex". Add an opt-in
uniformRowHeight flag for custom-renderer games to virtualize.

closes LAZ-717
@IDCs IDCs self-assigned this Jul 15, 2026
@IDCs
IDCs requested a review from a team as a code owner July 15, 2026 10:42
@erri120

erri120 commented Jul 15, 2026

Copy link
Copy Markdown
Member

Might be too difficult for a virtualized list but would be great to see a component test for that.

@IDCs IDCs added don't-merge Don't merge this yet, we're still discussing the code and removed don't-merge Don't merge this yet, we're still discussing the code labels Jul 15, 2026
@IDCs
IDCs marked this pull request as draft July 15, 2026 12:32
Extract the load order windowing, drag-reorder, change-diff and row
memoization into pure modules (ListWindow, dragReorder, loadOrderDiff,
RenderRowsCache) so the logic is testable without a DnD backend or real
layout, and cover them with unit tests. Add an FBLO test fixture
(makeFblo / makeLoadOrderEntry).

closes LAZ-717
@IDCs
IDCs marked this pull request as ready for review July 15, 2026 15:03
@IDCs

IDCs commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

A full drag-through-a-virtualized-list component test is awkward, so I split the windowing and reorder logic to small pure modules that test cleanly without fighting jsdom layout, and there's a component test for the mounting behaviour.

ListWindow - visible-range math, overscan, spacer padding, and the drag-clamp that keeps a dragged row rendered while it's scrolled outside the window (so its drag source doesn't unmount mid-drag).
dragReorder - the move/reorder logic and the hover midpoint guard.
DraggableList.test.tsx - asserts a 1000-item virtualized list only mounts a small window of rows, and every row when virtualization is off.

I stopped short of driving an actual DnD in a component test, but react-dnd's HTML5 backend needs real layout and pointer events that happy-dom doesn't provide, so a faithful end-to-end reorder belongs in a Playwright E2E rather than here I think.

@IDCs IDCs linked an issue Jul 16, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants