Skip to content

Warn once about auto_memoize=False without react_compiler - #7814

Merged
FarhanAliRaza merged 1 commit into
mainfrom
fix/dedupe-auto-memoize-warning
Nov 11, 2026
Merged

FarhanAliRaza merged 1 commit into
mainfrom
fix/dedupe-auto-memoize-warning

Conversation

@masenf

@masenf masenf commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Description

Found in the reflex 0.11.0a1 pre-release testing (FINDING-047).

The config is built several times per run. The "auto_memoize=False without react_compiler=True" warning added in #7694 had no once-per-process guard, so REFLEX_AUTO_MEMOIZE=false REFLEX_REACT_COMPILER=false reflex compile logged it twice and reflex run five times.

This PR adds a _warned_auto_memoize module flag in reflex_base/config.py, the same guard the react_compiler warning has with _warned_react_compiler. I used a flag rather than extra={"dedupe": True} because the dedupe filter only applies in managed (CLI) mode.

Checked end to end on a scratch app: reflex compile with both env vars set prints the warning once.

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

tests/units/test_config.py::test_warns_when_all_memoization_is_disabled now builds the config twice and asserts exactly one warning. On main the two disabled/disabled cases fail with assert 2 == 1. test_config.py passes, and ruff, ruff format, pyright and pre-commit are clean on the changed files.


Generated by Claude Code

View guided diff Turn on auto-fix

The config is built several times per run, and the warning added in #7694
had no once-per-process guard, so `reflex compile` logged it twice and
`reflex run` five times. Guard it with a module flag, the same way the
react_compiler warning is guarded by `_warned_react_compiler`.

Found in the reflex 0.11.0a1 pre-release testing (FINDING-047).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dxjadq3qkhKnqZR2b9WBFi
@masenf
masenf requested a review from a team as a code owner November 11, 2026 09:13
@masenf masenf added this to the v0.11.0 milestone Nov 11, 2026
@masenf masenf added the on deck PRs lined up to review / merge next label Nov 11, 2026
masenf pushed a commit that referenced this pull request Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dxjadq3qkhKnqZR2b9WBFi

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

Warn once per process when both page memoization options are disabled.

  • Disabled memoization now produces one warning per process.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "Warn once about auto_memoize=False witho..." · Reviewed by Greptile

@codspeed

codspeed Bot commented Nov 11, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 4.36%

1 warning

⚠️ 18 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

❌ 1 regressed benchmark
✅ 150 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_process_event_burst_independent_tokens[1] 2.7 ms 2.8 ms -4.36%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/dedupe-auto-memoize-warning (4b93f0a) with main (2d71015)

Open in CodSpeed

@masenf

masenf commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

CodSpeed is red here (test_process_event_burst_independent_tokens[1] -4.4%), but this PR doesn't cause it. That benchmark shows the same 4–5% drop on every PR in this batch. This PR only adds a once-per-process flag around a warning emitted while the config is built, which no event-processing path touches. CodSpeed is not a required check; leaving it for acknowledgement on CodSpeed.


Generated by Claude Code

@FarhanAliRaza
FarhanAliRaza merged commit 682201f into main Nov 11, 2026
169 of 171 checks passed
@FarhanAliRaza
FarhanAliRaza deleted the fix/dedupe-auto-memoize-warning branch November 11, 2026 13:47
masenf added a commit that referenced this pull request Nov 11, 2026
The config is built several times per run, and the warning added in #7694
had no once-per-process guard, so `reflex compile` logged it twice and
`reflex run` five times. Guard it with a module flag, the same way the
react_compiler warning is guarded by `_warned_react_compiler`.

Found in the reflex 0.11.0a1 pre-release testing (FINDING-047).

Claude-Session: https://claude.ai/code/session_01Dxjadq3qkhKnqZR2b9WBFi

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 682201f)
masenf pushed a commit that referenced this pull request Nov 11, 2026
…the train

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dxjadq3qkhKnqZR2b9WBFi
@masenf masenf added the release-train Issues found during agentic /prerelease-testing fanout, not necessarily validated bugs. label Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on deck PRs lined up to review / merge next release-train Issues found during agentic /prerelease-testing fanout, not necessarily validated bugs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants