Skip to content

Tal.ba/opt mem allocation - #1660

Open
TalBarYakar wants to merge 6 commits into
masterfrom
tal.ba/opt_mem_allocation
Open

TalBarYakar wants to merge 6 commits into
masterfrom
tal.ba/opt_mem_allocation

Conversation

@TalBarYakar

@TalBarYakar TalBarYakar commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Touches the core JSON parse path and a git-pinned ijson dependency; behavior is guarded by depth/readback tests and informational CI, but allocation changes could surface subtle regressions.

Overview
Switches JSON string ingestion to compact object allocation by bumping the pinned ijson revision and calling deserialize_compact_objects instead of the standard deserializer in from_str. Parsed JSON should remain equivalent; object backing storage and reported JSON.DEBUG MEMORY sizes can change.

Adds a non-gating memory-comparison GitHub Actions job (PR CI and nightly) that builds current vs master librejson.so, runs tests/pytest/memory_comparison.py, and publishes an artifact/summary for process memory, per-key memory, and replacement JSON.SET timing. Pytest updates replace fixed JSON.DEBUG MEMORY byte expectations with checks that default-path memory is positive and matches the explicit $ path.

A new unit test asserts compact parsing still honors recursion/depth limits and preserves serialized output.

Reviewed by Cursor Bugbot for commit 07158c1. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a8fd7cf. Configure here.

Comment thread .github/workflows/flow-memory-comparison.yml
needs: [prepare-values]
uses: ./.github/workflows/flow-memory-comparison.yml
with:
redis-ref: ${{ needs.prepare-values.outputs.redis-ref }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comparison job lacks PR skip guards

Low Severity

memory-comparison only needs prepare-values and has no if condition. Unlike memory-regression, it still runs on draft PRs and docs-only changes. Each run builds Redis plus two release modules, downloads the city fixture, and can take up to 45 minutes, even though the job cannot fail the PR.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a8fd7cf. Configure here.

@TalBarYakar
TalBarYakar force-pushed the tal.ba/opt_mem_allocation branch from 9f47c60 to 07158c1 Compare October 1, 2026 17:46
@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.06%. Comparing base (d678955) to head (07158c1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1660   +/-   ##
=======================================
  Coverage   88.06%   88.06%           
=======================================
  Files          17       17           
  Lines        5957     5957           
=======================================
  Hits         5246     5246           
  Misses        711      711           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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