Skip to content

Conversation

@MichaReiser
Copy link
Member

Summary

TY_MEMORY_REPORT gives us the same and maore information. Making the countme approach for salsa structs obsolete.

E.g. TY_MEMORY_REPORT gives you

`Definition`                                       metadata=7.41MB   fields=17.77MB  count=185129
`Expression`                                       metadata=2.34MB   fields=3.12MB   count=48748
`OverloadLiteral`                                  metadata=1.48MB   fields=1.05MB   count=26361
`Type < 'db >::member_lookup_with_policy_::interned_arguments` metadata=0.78MB   fields=0.89MB   count=13874
`File`                                             metadata=0.81MB   fields=0.81MB   count=12712
`FunctionType`                                     metadata=1.51MB   fields=0.65MB   count=26956
`ScopeId`                                          metadata=1.39MB   fields=0.60MB   count=49716
`IntersectionType`                                 metadata=0.27MB   fields=0.55MB   count=4899
`Type < 'db >::class_member_with_policy_::interned_arguments` metadata=0.39MB   fields=0.44MB   count=6925
`FunctionLiteral`                                  metadata=1.48MB   fields=0.42MB   count=26395
`ClassLiteral`                                     metadata=0.35MB   fields=0.25MB   count=6286
`TupleType`                                        metadata=0.16MB   fields=0.23MB   count=2919
`place_by_id::interned_arguments`                  metadata=0.75MB   fields=0.22MB   count=13439
`Type < 'db >::try_call_dunder_get_::interned_arguments` metadata=0.10MB   fields=0.17MB   count=1808
`StringLiteralType`                                metadata=0.59MB   fields=0.17MB   count=10562
`TypeVarInstance`                                  metadata=0.09MB   fields=0.16MB   count=1579
`ClassLiteral < 'db >::try_mro_::interned_arguments` metadata=0.56MB   fields=0.16MB   count=10054
`Type < 'db >::apply_specialization_::interned_arguments` metadata=0.22MB   fields=0.16MB   count=3970
`Specialization`                                   metadata=0.24MB   fields=0.14MB   count=4347
`GenericAlias`                                     metadata=0.36MB   fields=0.10MB   count=6429
`CallableType`                                     metadata=0.06MB   fields=0.10MB   count=1005
`StarImportPlaceholderPredicate`                   metadata=0.12MB   fields=0.08MB   count=4167
`ModuleNameIngredient`                             metadata=0.15MB   fields=0.07MB   count=2739
`PropertyInstanceType`                             metadata=0.06MB   fields=0.07MB   count=1016
`BoundMethodType`                                  metadata=0.09MB   fields=0.06MB   count=1523
`UnionType`                                        metadata=0.20MB   fields=0.06MB   count=3619
`PatternPredicate`                                 metadata=0.02MB   fields=0.04MB   count=768
`Unpack`                                           metadata=0.03MB   fields=0.04MB   count=637
`ModuleLiteralType`                                metadata=0.11MB   fields=0.03MB   count=1979
`GenericContext`                                   metadata=0.03MB   fields=0.03MB   count=507
`BareTypeAliasType`                                metadata=0.01MB   fields=0.01MB   count=201
`PEP695TypeAliasType`                              metadata=0.02MB   fields=0.01MB   count=272
`Type < 'db >::lookup_dunder_new_::interned_arguments` metadata=0.01MB   fields=0.01MB   count=238
`ProtocolInterface`                                metadata=0.01MB   fields=0.00MB   count=143
`BytesLiteralType`                                 metadata=0.01MB   fields=0.00MB   count=137
`TypeIsType`                                       metadata=0.00MB   fields=0.00MB   count=39
`BoundSuperType`                                   metadata=0.00MB   fields=0.00MB   count=26
`Program`                                          metadata=0.00MB   fields=0.00MB   count=1
`Project`                                          metadata=0.00MB   fields=0.00MB   count=1
`FileRoot`                                         metadata=0.00MB   fields=0.00MB   count=1
`module_type_symbols::interned_arguments`          metadata=0.00MB   fields=0.00MB   count=1
`dynamic_resolution_paths::interned_arguments`     metadata=0.00MB   fields=0.00MB   count=1

Test Plan

cargo build

@MichaReiser MichaReiser added internal An internal refactor or improvement ty Multi-file analysis & type inference labels Jul 10, 2025
@MichaReiser MichaReiser enabled auto-merge (squash) July 10, 2025 11:42
@MichaReiser MichaReiser merged commit 492f5bf into main Jul 10, 2025
38 checks passed
@MichaReiser MichaReiser deleted the micha/remove-countme branch July 10, 2025 11:45
@github-actions
Copy link
Contributor

mypy_primer results

No ecosystem changes detected ✅
No memory usage changes detected ✅

@github-actions
Copy link
Contributor

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.

UnboundVariable pushed a commit to UnboundVariable/ruff that referenced this pull request Jul 11, 2025
…re_help

* 'main' of https://github.com/astral-sh/ruff:
  Add simple integration tests for all output formats (astral-sh#19265)
  [`flake8-return`] Fix false-positive for variables used inside nested functions in `RET504`  (astral-sh#18433)
  [ty] Add a `--quiet` mode (astral-sh#19233)
  Treat form feed as valid whitespace before a line continuation (astral-sh#19220)
  [ty] Make `check_file` a salsa query (astral-sh#19255)
  [ty] Consolidate submodule resolving code between `types.rs` and `ide_support.rs` (astral-sh#19256)
  [ty] Remove countme from salsa-structs (astral-sh#19257)
  [ty] Improve and document equivalence for module-literal types (astral-sh#19243)
  [ty] Optimize protocol subtyping by removing expensive and unnecessary equivalence check from the top of `Type::has_relation_to()` (astral-sh#19230)
  [ty] Ecosystem analyzer: parallelize, fix race condition (astral-sh#19252)
  [ty] Add completion kind to playground (astral-sh#19251)
  [ty] Deploy ecosystem diff to Cloudflare pages (astral-sh#19234)
  [ty] Add semantic token provider to playground (astral-sh#19232)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants