Skip to content

perf(apple): build only the requested asset catalog page - #14032

Merged
vincentkoc merged 1 commit into
morluto:mainfrom
xu91102:codex/asset-catalog-page-projection
Nov 30, 2026
Merged

vincentkoc merged 1 commit into
morluto:mainfrom
xu91102:codex/asset-catalog-page-projection

Conversation

@xu91102

@xu91102 xu91102 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Build only the requested Apple asset catalog page and the rendition matches that Interface Builder references. This reduces avoidable page projection work within the asset-catalog direction of #13300.

Problem and expected behavior

Each seven-record page previously constructed a full record object for every catalog record and indexed every asset name. When the bundle has no resource keys, the page still paid that cost. Resource keys can refer to renditions outside the returned page, so those joins must still use the full inventory.

Change and scope

The asset catalog projector counts each catalog and constructs the requested window in catalog and record order. It scans rendition names when references exist and retains matches for the exact names requested. Empty catalogs, offsets beyond the last row, case-sensitive matching, ambiguity, and source indices keep their established behavior. This targets the projector. The existing offline bundle walk and assetutil invocation still own acquisition and verification. The related design issue is linked above.

Evidence and regression coverage

  • Actual macOS assetutil metadata from the 248-record Audio MIDI Setup catalog was used in six alternating before/after pairs. For 1,800 seven-record projections with no resource keys, median wall time was 68.4 → 47.9 ms, CPU was 93.0 → 68.5 ms, and peak RSS of the isolated process was 128.1 → 109.0 MiB.
  • With 108 actual resource references, median projection was 238.5 → 237.7 ms and CPU was 292.8 → 302.4 ms. The samples showed little elapsed improvement in that join-heavy case. The measured scope is page projection. Complete workflow timing, model token use and peak process-family memory are unmeasured.
  • With the installed macOS assetutil and the original system bundle, three real CLI pages and four actual stdio MCP pages on each revision produced byte-identical Evidence. The MCP run includes the exhausted page and kept all 108 resource matches on every page. The separate regression covers pagination across catalogs, conflicting renditions outside the page, a name of different case and unmatched or repeated keys.
  • Coverage is offline local macOS inspection. Other OS and live target workflows are outside the executed cases.

Validation performed

  • Five focused Apple catalog, resource coverage, finalization and golden test files — 74 passed and one skipped. The skip is an existing platform gate.
  • npm run build:cached, npm run check:ci:fast, npm run check:fast, and npm run metadata:check — passed.
  • npm run docs:check — passed, including eight README checks.
  • npm run verify:test-discovery, npm run verify:package, and package dry run — passed. The package verifier finished its owned cleanup.

Compatibility, safety, and release

The same CLI/MCP contract reports catalog digests, page metadata and off-page joins. Inspection uses the existing read-only system assetutil workflow. Package selection and generated metadata were validated.

Author readiness

Human owner: @xu91102

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T07:20:53.688368Z c6678e5 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

The PR builds only the requested asset catalog page and stores rendition matches only for requested resource keys.

  • Apple asset catalog pages build only the requested records.

Reviews (1) · Last reviewed commit: "perf(apple): build only the requested as..." · Reviewed by Greptile

@morluto morluto added area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior performance Performance regressions, scaling limits, and bounded-resource work labels Nov 26, 2026
@vincentkoc
vincentkoc merged commit 525b766 into morluto:main Nov 30, 2026
41 checks passed
vincentkoc added a commit to WoWHellgarve-HolyDeeW/rea that referenced this pull request Nov 30, 2026
* commit '7f7d34ad7c30a5fe015b642118dd40e8e9ac093d': (167 commits)
  fix(artifacts): classify member presence from the absent side coverage (morluto#15200)
  fix(tar): account for retained pax owner names (morluto#15195)
  fix(conformance): validate paired fixture count expectations (morluto#14125)
  fix(nds): report unreachable file name directories (morluto#15192)
  refactor(firmware): share admitted-file decoder buffering (morluto#15198)
  fix(binary): carry the runtime refusal's repair instruction in remediation (morluto#14123)
  fix(agentenv): reject COM0 and LPT0 bundle names (morluto#14971)
  test(environment): share the loopback capture fixture (morluto#15196)
  perf(png): reconstruct scanlines with one filter dispatch (morluto#11818)
  feat(iso9660): stream files across separated extents (morluto#15190)
  perf(apple): build only the requested asset catalog page (morluto#14032)
  perf(artifacts): isolate offline session composition from deep providers (morluto#15194)
  perf(evidence): bound investigation closure worklist by depth (morluto#15193)
  perf(audit): avoid copying complete log lines (morluto#15184)
  test(mcp): share server result readers (morluto#15174)
  fix(android): declare Android mapping and JNI fixed allowances (morluto#15183)
  fix(artifacts): retain deep comparison source chains (morluto#15191)
  perf(evidence): bound link inspection frontier by records (morluto#15189)
  perf(evidence): retain snapshots across duplicate imports (morluto#15186)
  fix(nro): exclude ASET header bytes from asset ranges (morluto#15185)
  ...
vincentkoc added a commit to XiaoBinGan/rea that referenced this pull request Nov 30, 2026
* commit '4ca43e2cb20f0edd86cdbf315a9c99c7b9b87468': (173 commits)
  fix(paths): reject Windows console device names (morluto#14972)
  fix(artifacts): classify member presence from the absent side coverage (morluto#15200)
  fix(tar): account for retained pax owner names (morluto#15195)
  fix(conformance): validate paired fixture count expectations (morluto#14125)
  fix(nds): report unreachable file name directories (morluto#15192)
  refactor(firmware): share admitted-file decoder buffering (morluto#15198)
  fix(binary): carry the runtime refusal's repair instruction in remediation (morluto#14123)
  fix(agentenv): reject COM0 and LPT0 bundle names (morluto#14971)
  test(environment): share the loopback capture fixture (morluto#15196)
  perf(png): reconstruct scanlines with one filter dispatch (morluto#11818)
  feat(iso9660): stream files across separated extents (morluto#15190)
  perf(apple): build only the requested asset catalog page (morluto#14032)
  perf(artifacts): isolate offline session composition from deep providers (morluto#15194)
  perf(evidence): bound investigation closure worklist by depth (morluto#15193)
  perf(audit): avoid copying complete log lines (morluto#15184)
  test(mcp): share server result readers (morluto#15174)
  fix(android): declare Android mapping and JNI fixed allowances (morluto#15183)
  fix(artifacts): retain deep comparison source chains (morluto#15191)
  perf(evidence): bound link inspection frontier by records (morluto#15189)
  perf(evidence): retain snapshots across duplicate imports (morluto#15186)
  ...
vincentkoc added a commit to ShuaixinHuang/rea that referenced this pull request Nov 30, 2026
* commit '4ca43e2cb20f0edd86cdbf315a9c99c7b9b87468': (34 commits)
  fix(paths): reject Windows console device names (morluto#14972)
  fix(artifacts): classify member presence from the absent side coverage (morluto#15200)
  fix(tar): account for retained pax owner names (morluto#15195)
  fix(conformance): validate paired fixture count expectations (morluto#14125)
  fix(nds): report unreachable file name directories (morluto#15192)
  refactor(firmware): share admitted-file decoder buffering (morluto#15198)
  fix(binary): carry the runtime refusal's repair instruction in remediation (morluto#14123)
  fix(agentenv): reject COM0 and LPT0 bundle names (morluto#14971)
  test(environment): share the loopback capture fixture (morluto#15196)
  perf(png): reconstruct scanlines with one filter dispatch (morluto#11818)
  feat(iso9660): stream files across separated extents (morluto#15190)
  perf(apple): build only the requested asset catalog page (morluto#14032)
  perf(artifacts): isolate offline session composition from deep providers (morluto#15194)
  perf(evidence): bound investigation closure worklist by depth (morluto#15193)
  perf(audit): avoid copying complete log lines (morluto#15184)
  test(mcp): share server result readers (morluto#15174)
  fix(android): declare Android mapping and JNI fixed allowances (morluto#15183)
  fix(artifacts): retain deep comparison source chains (morluto#15191)
  perf(evidence): bound link inspection frontier by records (morluto#15189)
  perf(evidence): retain snapshots across duplicate imports (morluto#15186)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior performance Performance regressions, scaling limits, and bounded-resource work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants