← Back to Pull requests

[Perf] Faster bitmap matcher builds #557

Merged
LaganYT merged 6 files (0 lines) on Nov 29, 2026 05:17 UTC
View on GitHub
LaganYT LaganYT commented on Nov 29, 2026 05:02 UTC
Author

Image searches on a mostly flat screen were slower than they needed to be. This swaps in rebuilt bitmap matcher files that run about 4x faster on typical screens and return the same matches.

The rebuilt files are the macOS ones (Python 3.7, 3.8, 3.9 Intel, 3.9 Apple Silicon) and the Windows 64-bit ones (Python 3.8, 3.9). The new build no longer depends on numpy's C interface, so it also loads on numpy 2.

Checked:

  • Ran the old and new macOS files side by side on Fuzzy Macro's own images with the variance and search-area settings the macro uses (3,060 calls per Python version). Every match was the same. The Python 3.8 file was about 11x faster in total and the 3.7 file about 9x.

  • Loaded the new 3.9 Apple Silicon file through the macro's loader and ran a find-first and a find-all.
  • One difference: the old 3.9 files list find_all_bitmap_cython results top to bottom, and the new ones list them left to right. The only caller that uses find-all (the item monitor's digit reader) sorts the hits by x first, so it behaves the same.

    Not checked: the Windows files were built on GitHub Actions but never loaded or run. The macro itself was not run in game.

    Diff: 0 lines (+0 / -0) across 6 files Reviewer: coderabbitai[bot] Review duration: 14m
    All Vouch review confidence checks passed
    Residual risk 0.03 = Change Risk (0.10) × (1 − Review Confidence (0.71)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.10 · 0 lines diff across 6 files
    0.10
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.65 · 1 substantive comment(s)
    0.65
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    70%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.000
    Real PR Conversation Timeline
    3 items
    coderabbitai[bot] coderabbitai[bot] commented on Nov 29, 2026 05:03 UTC
    Bot

    <!-- coderabbit-ai-generated:v1 -->

    <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
    <!-- This is an auto-generated comment: skip review by coderabbit.ai -->

    [!IMPORTANT]

    ## Review skipped

    > Review was skipped due to path filters

    > <details>

    <summary><strong>:no_entry: Files ignored due to path filters: 6</strong></summary>

    <dl>

    <dd>

    <br>

    > src/modules/bitmap_matcher/bitmap_matcher_py37_x86_64.so is excluded by !/.so

    src/modules/bitmap_matcher/bitmap_matcher_py38_x86_64.pyd is excluded by !/.pyd

    src/modules/bitmap_matcher/bitmap_matcher_py38_x86_64.so is excluded by !/.so

    src/modules/bitmap_matcher/bitmap_matcher_py39_arm64.so is excluded by !/.so

    src/modules/bitmap_matcher/bitmap_matcher_py39_x86_64.pyd is excluded by !/.pyd

    src/modules/bitmap_matcher/bitmap_matcher_py39_x86_64.so is excluded by !/.so

    > </dd>

    </dl>

    </details>

    > CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including /dist/ will override the default block on the dist directory, by removing the pattern from both the lists.

    > <details>

    <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary>

    <dl>

    <dd>

    <br>

    > - Source mode: Auto

    - Repository: Unavailable

    - Branch: Unavailable

    - File: No configuration file from this repository applied

    - Commit: Unavailable

    - Layers: Repository UI (base), Organization UI (inherited)

    - Review profile: CHILL

    - Plan: Advanced

    - Run ID: 0b28232d-4163-4774-a6e8-a50f51a9fcc3

    > </dd>

    </dl>

    </details>

    > You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

    > Use the checkbox below for a quick retry:

    - [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> Trigger review

    <!-- end of auto-generated comment: skip review by coderabbit.ai -->

    <!-- autopilot:start -->

  • <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

  • <!-- autopilot:end -->
    <!-- tips_start -->

    Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

    <details>
    <summary><strong>Share</strong></summary>
    <dl>
    <dd>
    <br>

  • X

  • Mastodon

  • Reddit

  • LinkedIn
  • </dd>
    </dl>
    </details>

    <!-- tips_end -->

    coderabbitai[bot] coderabbitai[bot] approved these changes on Nov 29, 2026 05:03 UTC
    Approved Reviewer

    Approved these changes.

    Assignees
    LaganYT LaganYT
    Labels
    risk: low confidence: 70.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 10.3% (LOW) · Higher = larger blast radius
    10.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 70.7% · Lower = rushed or shallow review
    70.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 3% · Safe to merge
    3%