Skip to content

perf(fspy): use sparse Windows shared memory#524

Merged
wan9chi merged 21 commits into
mainfrom
windows-shm-backend
Jul 11, 2026
Merged

perf(fspy): use sparse Windows shared memory#524
wan9chi merged 21 commits into
mainfrom
windows-shm-backend

Conversation

@wan9chi

@wan9chi wan9chi commented Jul 9, 2026

Copy link
Copy Markdown
Member

Motivation

Avoid reserving disk space for the full Windows mapping while keeping record writes memory-mapped.

Changes

  • Maps a sparse, delete-on-close temporary file through a named Windows section.
  • Uses a size-independent section name and opens another view using only the identifier.
  • Maps the complete section and derives its length from the mapped view.
  • Fails creation when the temporary volume does not support sparse files.
  • Keeps existing views valid after the owner closes its file and view.
  • Replaces linker inputs previously supplied by shared_memory with direct windows-sys imports.
  • Covers cross-process access, cleanup, sparse allocation, and changed environments.

wan9chi commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: adc5221ce4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/fspy_shm/src/windows/mod.rs Outdated
@wan9chi wan9chi force-pushed the windows-shm-backend branch from adc5221 to 39b502d Compare July 9, 2026 07:57
@wan9chi wan9chi force-pushed the linux-memfd-shm branch 2 times, most recently from 379cedd to 67534d3 Compare July 9, 2026 14:16
@wan9chi wan9chi force-pushed the windows-shm-backend branch from 39b502d to 29bdc15 Compare July 9, 2026 14:17
@wan9chi wan9chi marked this pull request as draft July 10, 2026 01:16
@wan9chi wan9chi force-pushed the windows-shm-backend branch from 29bdc15 to 9bcba8e Compare July 10, 2026 06:03
@wan9chi wan9chi force-pushed the windows-shm-backend branch 2 times, most recently from 62be316 to 283d922 Compare July 10, 2026 07:04
@wan9chi wan9chi force-pushed the linux-memfd-shm branch 2 times, most recently from 3f7527b to a6a417e Compare July 10, 2026 07:14
@wan9chi wan9chi force-pushed the windows-shm-backend branch from 283d922 to 6691051 Compare July 10, 2026 07:14
@wan9chi wan9chi force-pushed the windows-shm-backend branch from c18b242 to f2337e4 Compare July 11, 2026 00:38
@wan9chi wan9chi marked this pull request as ready for review July 11, 2026 00:44
@wan9chi wan9chi changed the base branch from linux-memfd-shm to graphite-base/524 July 11, 2026 00:44
@graphite-app graphite-app Bot changed the base branch from graphite-base/524 to main July 11, 2026 00:45
wan9chi and others added 20 commits July 11, 2026 00:45
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5.6 <gpt-5.6@openai.com>

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
@wan9chi wan9chi force-pushed the windows-shm-backend branch from f2337e4 to d9c88f3 Compare July 11, 2026 00:45
Co-authored-by: GPT-5 Codex <codex@openai.com>
@wan9chi wan9chi force-pushed the windows-shm-backend branch from d9c88f3 to e476b9c Compare July 11, 2026 00:45
@wan9chi wan9chi merged commit 17fe597 into main Jul 11, 2026
16 checks passed

wan9chi commented Jul 11, 2026

Copy link
Copy Markdown
Member Author

Merge activity

@wan9chi wan9chi deleted the windows-shm-backend branch July 11, 2026 00:48
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.

1 participant