Skip to content

[ty] Update Salsa to reduce query revision extra allocations#25774

Closed
MichaReiser wants to merge 1 commit into
micha/salsa-pr1108-codspeedfrom
micha/salsa-pr1112
Closed

[ty] Update Salsa to reduce query revision extra allocations#25774
MichaReiser wants to merge 1 commit into
micha/salsa-pr1108-codspeedfrom
micha/salsa-pr1112

Conversation

@MichaReiser

Copy link
Copy Markdown
Member

No description provided.

@astral-sh-bot

astral-sh-bot Bot commented Jun 9, 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 92.16%. The percentage of expected errors that received a diagnostic held steady at 87.31%. The number of fully passing files held steady at 92/134.

@astral-sh-bot

astral-sh-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

Memory usage report

Summary

Project Old New Diff Outcome
flake8 34.25MB 34.25MB -0.01% (5.23kB) ⬇️
trio 82.62MB 82.59MB -0.03% (28.73kB) ⬇️
sphinx 189.99MB 189.93MB -0.03% (63.02kB) ⬇️
prefect 513.90MB 513.77MB -0.03% (133.97kB) ⬇️

Significant changes

Click to expand detailed breakdown

flake8

Name Old New Diff Outcome
semantic_index 9.70MB 9.70MB -0.02% (2.17kB) ⬇️
infer_definition_types 1.31MB 1.31MB -0.07% (1.00kB) ⬇️
infer_expression_types_impl 746.79kB 745.96kB -0.11% (848.00B) ⬇️
infer_statement_types_impl 29.66kB 29.49kB -0.58% (176.00B) ⬇️
StaticClassLiteral<'db>::try_mro_ 247.43kB 247.29kB -0.06% (144.00B) ⬇️
StaticClassLiteral<'db>::own_fields_ 6.29kB 6.15kB -2.24% (144.00B) ⬇️
is_typed_dict_inner 13.51kB 13.37kB -1.04% (144.00B) ⬇️
all_narrowing_constraints_for_expression 153.34kB 153.23kB -0.07% (112.00B) ⬇️
loop_header_reachability 9.29kB 9.20kB -1.01% (96.00B) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_ 33.98kB 33.91kB -0.23% (80.00B) ⬇️
member_lookup_with_policy_inner 292.30kB 292.22kB -0.03% (80.00B) ⬇️
infer_expression_type_impl 10.59kB 10.51kB -0.74% (80.00B) ⬇️
infer_scope_types_impl 662.12kB 662.06kB -0.01% (64.00B) ⬇️
infer_deferred_types 336.45kB 336.43kB -0.00% (16.00B) ⬇️
cached_protocol_interface 39.10kB 39.09kB -0.04% (16.00B) ⬇️
... 7 more

trio

Name Old New Diff Outcome
infer_definition_types 5.47MB 5.46MB -0.13% (7.39kB) ⬇️
infer_expression_types_impl 4.98MB 4.97MB -0.12% (6.31kB) ⬇️
semantic_index 21.13MB 21.13MB -0.02% (4.22kB) ⬇️
StaticClassLiteral<'db>::decorators_inner_ 36.84kB 35.17kB -4.54% (1.67kB) ⬇️
all_narrowing_constraints_for_expression 913.16kB 912.02kB -0.12% (1.14kB) ⬇️
loop_header_reachability 91.74kB 90.76kB -1.07% (1008.00B) ⬇️
StaticClassLiteral<'db>::try_mro_ 605.05kB 604.09kB -0.16% (976.00B) ⬇️
enum_metadata 168.73kB 167.88kB -0.50% (864.00B) ⬇️
try_metaclass_inner 78.07kB 77.23kB -1.08% (864.00B) ⬇️
inherited_legacy_generic_context_inner 36.13kB 35.35kB -2.16% (800.00B) ⬇️
explicit_bases_inner 56.83kB 56.05kB -1.37% (800.00B) ⬇️
infer_scope_types_impl 3.15MB 3.15MB -0.02% (544.00B) ⬇️
infer_expression_type_impl 44.84kB 44.46kB -0.84% (384.00B) ⬇️
member_lookup_with_policy_inner 1.03MB 1.03MB -0.03% (336.00B) ⬇️
infer_statement_types_impl 36.06kB 35.75kB -0.87% (320.00B) ⬇️
... 14 more

sphinx

Name Old New Diff Outcome
infer_expression_types_impl 15.45MB 15.44MB -0.11% (18.09kB) ⬇️
infer_definition_types 16.84MB 16.82MB -0.10% (17.58kB) ⬇️
semantic_index 43.41MB 43.40MB -0.03% (14.08kB) ⬇️
loop_header_reachability 254.69kB 251.99kB -1.06% (2.70kB) ⬇️
infer_statement_types_impl 342.42kB 340.11kB -0.68% (2.31kB) ⬇️
all_narrowing_constraints_for_expression 3.74MB 3.74MB -0.06% (2.28kB) ⬇️
infer_scope_types_impl 10.63MB 10.63MB -0.01% (1.25kB) ⬇️
infer_expression_type_impl 200.32kB 199.12kB -0.60% (1.20kB) ⬇️
member_lookup_with_policy_inner 4.06MB 4.05MB -0.02% (992.00B) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_ 537.84kB 537.21kB -0.12% (640.00B) ⬇️
StaticClassLiteral<'db>::try_mro_ 1.89MB 1.89MB -0.02% (416.00B) ⬇️
is_typed_dict_inner 90.59kB 90.19kB -0.45% (416.00B) ⬇️
StaticClassLiteral<'db>::own_fields_ 27.93kB 27.54kB -1.40% (400.00B) ⬇️
infer_unpack_types 345.47kB 345.32kB -0.05% (160.00B) ⬇️
FunctionType<'db>::last_definition_raw_signature_ 2.67MB 2.67MB -0.00% (80.00B) ⬇️
... 19 more

prefect

Name Old New Diff Outcome
infer_definition_types 61.71MB 61.68MB -0.06% (36.33kB) ⬇️
semantic_index 129.31MB 129.28MB -0.02% (31.94kB) ⬇️
infer_expression_types_impl 42.32MB 42.29MB -0.07% (31.58kB) ⬇️
infer_scope_types_impl 40.69MB 40.68MB -0.02% (6.80kB) ⬇️
all_narrowing_constraints_for_expression 12.19MB 12.19MB -0.04% (5.09kB) ⬇️
infer_statement_types_impl 658.51kB 654.46kB -0.61% (4.05kB) ⬇️
loop_header_reachability 314.18kB 310.99kB -1.01% (3.19kB) ⬇️
member_lookup_with_policy_inner 9.77MB 9.77MB -0.02% (2.39kB) ⬇️
place_by_id 4.05MB 4.04MB -0.05% (2.27kB) ⬇️
infer_expression_type_impl 278.79kB 276.66kB -0.76% (2.12kB) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_ 773.79kB 771.85kB -0.25% (1.94kB) ⬇️
StaticClassLiteral<'db>::decorators_inner_ 49.21kB 47.77kB -2.92% (1.44kB) ⬇️
StaticClassLiteral<'db>::try_mro_ 3.68MB 3.68MB -0.02% (864.00B) ⬇️
inherited_legacy_generic_context_inner 256.74kB 256.13kB -0.24% (624.00B) ⬇️
explicit_bases_inner 374.02kB 373.41kB -0.16% (624.00B) ⬇️
... 18 more

@astral-sh-bot

astral-sh-bot Bot commented Jun 9, 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 9, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 9.4%

⚡ 1 improved benchmark
✅ 126 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation DateType 249.1 ms 227.7 ms +9.4%

Tip

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


Comparing micha/salsa-pr1112 (bcb586c) with micha/salsa-pr1108-codspeed (b6e2259)

Open in CodSpeed

@astral-sh-bot

astral-sh-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@MichaReiser

Copy link
Copy Markdown
Member Author

Wow, I did not expect this perf improvement. The memory usage improvement is disappointing 😆

@MichaReiser

Copy link
Copy Markdown
Member Author

This has been merged upstream

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