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

Skip to content

[ty] Cache results in desperate module resolution#24977

Merged
charliermarsh merged 1 commit into
mainfrom
charlie/desperate
May 4, 2026
Merged

[ty] Cache results in desperate module resolution#24977
charliermarsh merged 1 commit into
mainfrom
charlie/desperate

Conversation

@charliermarsh
Copy link
Copy Markdown
Member

@charliermarsh charliermarsh commented May 3, 2026

Summary

Per Codex, in pyx, this adds 1.3MB to the cache (0.4%) in return for a 5-10% faster walltime.

@charliermarsh charliermarsh added performance Potential performance improvement ty Multi-file analysis & type inference labels May 3, 2026
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented May 3, 2026

Typing conformance results

No changes detected ✅

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

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented May 3, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 679.04MB 680.57MB +0.23% (1.53MB)
sphinx 260.05MB 260.53MB +0.18% (486.84kB)
trio 117.05MB 117.16MB +0.10% (115.91kB)
flake8 47.77MB 47.79MB +0.05% (24.13kB)

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
desperately_resolve_module 0.00B 745.16kB +745.16kB (new)
desperately_resolve_module::interned_arguments 0.00B 670.64kB +670.64kB (new)
infer_scope_types_impl 55.60MB 55.74MB +0.25% (143.88kB)
infer_expression_type_impl 7.47MB 7.48MB +0.05% (3.96kB)
infer_expression_types_impl 56.16MB 56.17MB +0.00% (2.12kB)
infer_definition_types 86.06MB 86.07MB +0.00% (1.91kB)
all_negative_narrowing_constraints_for_expression 1.95MB 1.95MB +0.02% (440.00B)
all_narrowing_constraints_for_expression 6.02MB 6.02MB +0.01% (412.00B)
Type<'db>::member_lookup_with_policy_ 15.83MB 15.83MB +0.00% (372.00B)
CallableType 2.39MB 2.39MB +0.01% (304.00B)
semantic_index 176.61MB 176.61MB +0.00% (180.00B)
is_redundant_with_impl::interned_arguments 2.13MB 2.13MB -0.01% (176.00B)
StaticClassLiteral<'db>::implicit_attribute_inner_ 6.62MB 6.62MB +0.00% (152.00B)
UnionType 888.56kB 888.44kB -0.01% (128.00B)
Type<'db>::member_lookup_with_policy_::interned_arguments 5.98MB 5.98MB +0.00% (104.00B)
... 4 more

sphinx

Name Old New Diff Outcome
desperately_resolve_module 0.00B 233.36kB +233.36kB (new)
desperately_resolve_module::interned_arguments 0.00B 210.02kB +210.02kB (new)
infer_scope_types_impl 15.44MB 15.48MB +0.28% (43.51kB)
infer_definition_types 23.90MB 23.90MB +0.00% (444.00B)
CallableType 1.17MB 1.17MB -0.02% (304.00B)
infer_expression_types_impl 20.47MB 20.47MB -0.00% (220.00B)
infer_expression_type_impl 2.90MB 2.90MB -0.01% (172.00B)
semantic_index 61.27MB 61.27MB +0.00% (132.00B)
all_narrowing_constraints_for_expression 2.39MB 2.39MB +0.00% (84.00B)
all_negative_narrowing_constraints_for_expression 1.05MB 1.05MB +0.01% (84.00B)
StaticClassLiteral<'db>::implicit_attribute_inner_ 2.36MB 2.36MB -0.00% (60.00B)
Type<'db>::member_lookup_with_policy_ 6.84MB 6.84MB -0.00% (44.00B)

trio

Name Old New Diff Outcome
desperately_resolve_module 0.00B 57.03kB +57.03kB (new)
desperately_resolve_module::interned_arguments 0.00B 51.33kB +51.33kB (new)
infer_scope_types_impl 4.73MB 4.73MB +0.12% (5.88kB)
infer_definition_types 7.80MB 7.80MB +0.02% (1.55kB)
semantic_index 30.03MB 30.03MB +0.00% (120.00B)

flake8

Name Old New Diff Outcome
desperately_resolve_module 0.00B 11.95kB +11.95kB (new)
desperately_resolve_module::interned_arguments 0.00B 10.76kB +10.76kB (new)
infer_scope_types_impl 976.70kB 978.04kB +0.14% (1.34kB)
infer_definition_types 1.87MB 1.87MB +0.00% (72.00B)
semantic_index 13.74MB 13.74MB +0.00% (12.00B)

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented May 3, 2026

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

@charliermarsh charliermarsh marked this pull request as ready for review May 3, 2026 00:20
@charliermarsh charliermarsh merged commit a88b2f6 into main May 4, 2026
58 checks passed
@charliermarsh charliermarsh deleted the charlie/desperate branch May 4, 2026 13:54
carljm added a commit that referenced this pull request May 6, 2026
* main: (63 commits)
  Update uraimo/run-on-arch-action action to v3.1.0 (#25011)
  Update dependency astral-sh/uv to v0.11.10 (#25002)
  Update prek dependencies (#25003)
  Update taiki-e/install-action action to v2.75.25 (#25007)
  Update Rust crate mimalloc to v0.1.50 (#25006)
  Update Rust crate libc to v0.2.186 (#25005)
  Update maturin to v1.13.1 (#25009)
  Update CodSpeedHQ/action action to v4.15.0 (#25008)
  Update Rust crate jiff to v0.2.24 (#25004)
  Increase max value of `line-length` setting (#24962)
  [ty] Fix the Pyodide assets deployment in the ty playground. (#24994)
  [ty] Selectively promote a union of homogeneous fixed-length tuples to a single variadic tuple. (#24705)
  [ty] Cache results in desperate module resolution (#24977)
  [ty] implement proper handling of recursive types in `CycleDetector` (#24773)
  [ty] Skip parameter accumulation for object variadics (#24976)
  Add missing rust related files when detecting changes in CI (#24971)
  [ty] Expand support for narrowing within walruses (#24968)
  [ty] Fix missing visitor guard in `Callable` branch (#24964)
  [ty] Allow reference finding in stringified annotations (#24956)
  [ty] Unpack Union of TypedDict in various sites (#24958)
  ...
thejchap pushed a commit to thejchap/ruff that referenced this pull request May 23, 2026
## Summary

Per Codex, in pyx, this adds 1.3MB to the cache (0.4%) in return for a
5-10% faster walltime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Potential performance improvement ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants