perf: join adjacent title-memory copies by default #705

Open
github-bot wants to merge 1 commit from github-bot/gh-705 into main AGit
Owner

@⁠pixelpulsexd on GitHub · 2026-11-25 05:15 UTC · original
pixelpulsexd:perf/frame-profiling → main · +3 −3 · 1 files · 1 commits · open

Summary

This PR enables joining adjacent title-memory copies by default to reduce memory-copy overhead during gameplay.

Motivation

Run 86 logged 14,042 kernel copy calls per frame, involving approximately 480-byte copies.

These operations accounted for approximately 19 ms, including refreshes.

Changes

  • Join adjacent deferred copies by default.
  • Add VICTORY_JOIN_COPIES=0 to restore the previous behavior.
  • Preserve continues() validation.
  • Continue rejecting gaps and self-overlapping copies.
  • Preserve per-page fallback behavior for unmapped pages.

Expected benefits

  • Reduce the number of kernel copy calls.
  • Reduce memory-copy overhead.
  • Improve frame-time efficiency.

Testing

  • Verify default behavior.
  • Verify VICTORY_JOIN_COPIES=0.
  • Test unmapped-page fallback.
  • Verify gaps and self-overlapping copies are still rejected.
  • Compare before/after performance.
**@⁠pixelpulsexd** on GitHub · 2026-11-25 05:15 UTC · [original](https://github.com/fxceless/victory-fork/pull/705) `pixelpulsexd:perf/frame-profiling` → `main` · +3 −3 · 1 files · 1 commits · open ## Summary This PR enables joining adjacent title-memory copies by default to reduce memory-copy overhead during gameplay. ### Motivation Run 86 logged 14,042 kernel copy calls per frame, involving approximately 480-byte copies. These operations accounted for approximately 19 ms, including refreshes. ### Changes - Join adjacent deferred copies by default. - Add `VICTORY_JOIN_COPIES=0` to restore the previous behavior. - Preserve `continues()` validation. - Continue rejecting gaps and self-overlapping copies. - Preserve per-page fallback behavior for unmapped pages. ### Expected benefits - Reduce the number of kernel copy calls. - Reduce memory-copy overhead. - Improve frame-time efficiency. ### Testing - [ ] Verify default behavior. - [ ] Verify `VICTORY_JOIN_COPIES=0`. - [ ] Test unmapped-page fallback. - [ ] Verify gaps and self-overlapping copies are still rejected. - [ ] Compare before/after performance.
Run 86 logged 14,042 kernel copy calls per frame for ~480-byte copies (~19 ms including refreshes). Join adjacent deferred copies by default; VICTORY_JOIN_COPIES=0 restores the old path. continues() still rejects gaps and self-overlap, and unmapped pages fall back per page.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:49:19 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/705/head:github-bot/gh-705'
git switch 'github-bot/gh-705'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-705'
git switch 'github-bot/gh-705'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-705'
git switch 'github-bot/gh-705'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-705'
git switch 'main'
git merge --squash 'github-bot/gh-705'
git switch 'main'
git merge --ff-only 'github-bot/gh-705'
git switch 'main'
git merge 'github-bot/gh-705'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.