Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ty] Flatten retained declaration states#25912

Merged
MichaReiser merged 1 commit into
mainfrom
micha/ty-flatten-retained-declarations
Jun 13, 2026
Merged

[ty] Flatten retained declaration states#25912
MichaReiser merged 1 commit into
mainfrom
micha/ty-flatten-retained-declarations

Conversation

@MichaReiser

@MichaReiser MichaReiser commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

Store retained declaration states as offsets into one contiguous array instead of a SmallVec per state. This reduced semantic-index memory by 14.4 MiB on Home Assistant.

Test Plan

Testing: Core semantic-index tests and pre-commit hooks passed.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Jun 12, 2026
@astral-sh-bot

astral-sh-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 94.36%. The percentage of expected errors that received a diagnostic held steady at 88.82%. The number of fully passing files held steady at 93/134.

@astral-sh-bot

astral-sh-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

Memory usage report

Summary

Project Old New Diff Outcome
flake8 34.63MB 34.40MB -0.67% (238.20kB) ⬇️
trio 85.02MB 84.51MB -0.60% (523.89kB) ⬇️
sphinx 200.45MB 199.49MB -0.48% (990.61kB) ⬇️
prefect 545.78MB 543.26MB -0.46% (2.52MB) ⬇️

Significant changes

Click to expand detailed breakdown

flake8

Name Old New Diff Outcome
semantic_index 9.47MB 9.24MB -2.46% (238.20kB) ⬇️

trio

Name Old New Diff Outcome
semantic_index 20.67MB 20.16MB -2.47% (523.89kB) ⬇️

sphinx

Name Old New Diff Outcome
semantic_index 42.51MB 41.54MB -2.28% (990.61kB) ⬇️

prefect

Name Old New Diff Outcome
semantic_index 127.25MB 124.74MB -1.98% (2.52MB) ⬇️

@astral-sh-bot

astral-sh-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.

Full report with detailed diff (timing results)

@codspeed-hq

codspeed-hq Bot commented Jun 12, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 3.32%

⚡ 2 improved benchmarks
✅ 65 untouched benchmarks
⏩ 60 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime static_frame 22.7 s 21.9 s +3.33%
WallTime colour_science 56 s 54.2 s +3.31%

Tip

Curious why this is faster? Use the CodSpeed MCP and ask your agent.


Comparing micha/ty-flatten-retained-declarations (0833476) with main (a4f73ff)

Open in CodSpeed

Footnotes

  1. 60 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@MichaReiser MichaReiser marked this pull request as ready for review June 13, 2026 08:41
@astral-sh-bot astral-sh-bot Bot requested a review from charliermarsh June 13, 2026 08:41
@MichaReiser MichaReiser merged commit 888bfef into main Jun 13, 2026
59 checks passed
@MichaReiser MichaReiser deleted the micha/ty-flatten-retained-declarations branch June 13, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

memory ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants