Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e39931d9de
ℹ️ 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".
| if (baseline is not null) run.baselines.Add(page.PageNumber, baseline); | ||
| if (comparison is not null) run.comparisons.Add(page.PageNumber, comparison); |
There was a problem hiding this comment.
Bound the retained page-flow comparison buffers
For multi-page PDFs whose flow plan is ready, this loop now retains every page's baseline and flow comparison until adoption has finished for the entire document. PageFlowComparison owns two BGR content images, content masks, and display masks, while the baseline owns additional masks; previously these buffers were disposed after each page's adoption check. For approximately full-page content surfaces, 30 A4 pages at 300 DPI can therefore retain roughly 3 GB even without optional removal masks or projection data, before working buffers and the new raster cache. Such inputs remain within MaximumPixels, so comparisons that previously ran page-by-page can now exhaust memory. Use a byte-bounded cache and dispose/recompute evicted comparisons rather than retaining the whole document.
Useful? React with 👍 / 👎.
- PageComparer.Cluster: fast-path 0px raw difference masks before array copy/allocation and replace LINQ byte count with SIMD Span.Count - RowGroupValidator & RowSupport: replace per-pixel HashSet/LINQ delegates with flat array/loop helpers - PageFlowCliTests & AnchoredAcceptanceTests: cache repeated 'on' CLI runs and share rendered fixture pages/text across test cases
- Bound retained PageFlowComparison and PageComparison buffers in PageFlowRun to 256 MiB via RetainedBytes accounting, disposing overflow entries and falling back to on-demand comparison - Immediately clear retained PageFlowComparison entries when any page fails flow adoption - Release temporary ProjectionData after RowProjection.Create in PageFlowComparison.Create
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
概要
全 2,375 件のテスト品質・カバレッジ・検出条件・予算制約を一切維持したまま、テスト内部・CI・製品比較パイプラインの重複処理を解消して実行時間を最適化します。
主な変更点
GoldenDataにUnoptimizedDifferenceと PNG/JSON キャッシュを追加し、42 ゴールデンケースに対する未最適化パス(useGroupBounds: false)の重複計算(3回→1回)を解消PageFlowCliTests・AnchoredAcceptanceTestsの固定 Fixture SHA-256 検証およびcarry_enabled: false(off)基準比較のキャッシュ化・--no-html指定CliProcess.Runのインプロセス化):CliProcess.RunをCliApplication.Runのインプロセス呼び出しへ移行し、約 154 回のdotnetサブプロセス起動オーバーヘッドを削減CliProcess.RunProcessで実サブプロセス実行を維持tools/build-macos-runtime.pyに--skip-existing(既存.nupkgの整合性検証付きスキップ)を追加.github/workflows/ci.ymlでout/packages/ReportDiff.OpenCvSharp4.runtime.osx.*.nupkgをactions/cacheでキャッシュ化ComparisonInput.ReadPageに最大 4 ページの LRU キャッシュを導入し、同一ページの PDFium 再ラスタライズを排除PdfTextReaderのページ解析・単語抽出(最大 4 ページ LRU)・ReadRowWords・InspectFonts、およびPdfFontInspectorのIndirectReference単位のフォント検査結果をキャッシュ化AnchoredRun.PrepareのAnchoredComparisonResultをAnchoredRun.Saveで再利用し、同一内容面の二重比較を解消PageFlowRun.Prepareで算出したAlignmentResult・PageFlowComparison・基準PageComparisonをComparisonRunner/RowComparerへ引き継ぎ、PageFlowPlan再構築時の未変更帯検証・比較面を再利用MatBuffers・PageFlowBandVerifier.Digest・PageFlowCollectorで連続メモリの一括コピーおよび白行ハッシュ再利用を導入ローカル検証結果
dotnet build -c Release: 警告 0・エラー 0dotnet test --no-build --no-restore -c Release --parallel none --minimum-expected-tests 2375 --progress on: