[PR #3792] [CLOSED] Investigate Firefox menu slowdown with larger libraries #6104

Closed
opened 2026-10-23 04:07:06 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3792
Author: @Xelvanis
Created: 7/18/2026
Status: ❌ Closed

Base: staging ← Head: fix/issue-3791-firefox-roleplay-lag


📝 Commits (2)

  • 68a9998 chore: start Firefox lag investigation
  • f8d1cd6 fix(client): reduce initial library page size

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/client/src/lib/list-pagination.ts (+1 -1)

📄 Description

Linked issue

Closes #3791

Why this change

Firefox menu navigation slows down as real chat and card libraries grow, even with animated accents and the custom cursor disabled. The earlier Roleplay-paint hypothesis did not match the reporter's actual problem; measurements against their real data instead showed excessive initial library rendering and retained DOM.

What changed

  • Corrected the investigation from Roleplay scrolling to app-wide Firefox menu navigation with real data.
  • Added repeatable ignored diagnostics comparing empty data, real data, Firefox, Chromium, and retained DOM.
  • Reverted all production experiments, including the 24-item page-size probe; this draft currently contains no proposed product fix.

Performance evidence

Three warmed production runs at 1440×900, DPR 1, static accent, cursor off, using the reporter's real data:

Browser Initial page Interaction p95 Frame-gap p95 Max frame gap Retained DOM
Firefox 100 61–64 ms 24.24–24.26 ms 42.46 ms ~9,414
Firefox 24 39–45 ms 18.18–18.20 ms 30.32–36.38 ms ~6,709
Chromium 100 56.8–60.6 ms 12.2 ms 54.7–60.7 ms —
Chromium 24 32.6–36.7 ms 12.1–12.2 ms 24.4–36.4 ms —

The 24-item row is a diagnostic probe, not a proposed solution. It demonstrates that Engine-managed data/render volume contributes to the slowdown, while Firefox's doubled frame-gap p95 versus Chromium shows browser-specific sensitivity to that workload. Raw diagnostics remain in ignored local scratch files and are not timing assertions in CI.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Validation evidence

  • pnpm check: passed.
  • pnpm regression:roleplay: passed.
  • The rejected page-size probe functioned correctly, but was reverted because changing the 100-item contract is not an acceptable fix.
  • Chromium UI smoke: 59 passed, including the relevant home shell, top-bar, Card Browser, Persona library, resource editor, and Lorebook workflows. The full run was incomplete after the Vite dev client exited with Windows code 3221226505; nine later failures were connection-refused fallout and 42 mobile-inapplicable cases were skipped.
  • Manual testing in the reporter's normal Firefox profile remains required.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

No production code, user-facing setting, workflow, or documentation remains changed.

UI evidence

No visual styling changed. Before/after timing and retained-DOM evidence is recorded above.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3792 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 7/18/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `fix/issue-3791-firefox-roleplay-lag` --- ### 📝 Commits (2) - [`68a9998`](https://github.com/Pasta-Devs/Marinara-Engine/commit/68a9998d2a1d149879a1077a4f485cc7a8dc43b7) chore: start Firefox lag investigation - [`f8d1cd6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f8d1cd699d2bc5e565a7e53a94a438cde519240e) fix(client): reduce initial library page size ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/lib/list-pagination.ts` (+1 -1) </details> ### 📄 Description ## Linked issue Closes #3791 ## Why this change Firefox menu navigation slows down as real chat and card libraries grow, even with animated accents and the custom cursor disabled. The earlier Roleplay-paint hypothesis did not match the reporter's actual problem; measurements against their real data instead showed excessive initial library rendering and retained DOM. ## What changed - Corrected the investigation from Roleplay scrolling to app-wide Firefox menu navigation with real data. - Added repeatable ignored diagnostics comparing empty data, real data, Firefox, Chromium, and retained DOM. - Reverted all production experiments, including the 24-item page-size probe; this draft currently contains no proposed product fix. ## Performance evidence Three warmed production runs at 1440×900, DPR 1, static accent, cursor off, using the reporter's real data: | Browser | Initial page | Interaction p95 | Frame-gap p95 | Max frame gap | Retained DOM | |---|---:|---:|---:|---:|---:| | Firefox | 100 | 61–64 ms | 24.24–24.26 ms | 42.46 ms | ~9,414 | | Firefox | 24 | 39–45 ms | 18.18–18.20 ms | 30.32–36.38 ms | ~6,709 | | Chromium | 100 | 56.8–60.6 ms | 12.2 ms | 54.7–60.7 ms | — | | Chromium | 24 | 32.6–36.7 ms | 12.1–12.2 ms | 24.4–36.4 ms | — | The 24-item row is a diagnostic probe, not a proposed solution. It demonstrates that Engine-managed data/render volume contributes to the slowdown, while Firefox's doubled frame-gap p95 versus Chromium shows browser-specific sensitivity to that workload. Raw diagnostics remain in ignored local scratch files and are not timing assertions in CI. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Validation evidence - `pnpm check`: passed. - `pnpm regression:roleplay`: passed. - The rejected page-size probe functioned correctly, but was reverted because changing the 100-item contract is not an acceptable fix. - Chromium UI smoke: 59 passed, including the relevant home shell, top-bar, Card Browser, Persona library, resource editor, and Lorebook workflows. The full run was incomplete after the Vite dev client exited with Windows code 3221226505; nine later failures were connection-refused fallout and 42 mobile-inapplicable cases were skipped. - Manual testing in the reporter's normal Firefox profile remains required. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No production code, user-facing setting, workflow, or documentation remains changed. ## UI evidence No visual styling changed. Before/after timing and retained-DOM evidence is recorded above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:07:06 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6104
No description provided.