Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PERF: Eliminate circular references in accessor attributes #58733

Merged
merged 1 commit into from
May 16, 2024

Conversation

mroeschke
Copy link
Member

Given the discussion in those issues, appears users are OK with the tradeoff of accessor initialization not being cached in favor of eliminating a circular references that could block garbage collection

@mroeschke mroeschke added Performance Memory or execution speed performance Accessors accessor registration mechanism (not .str, .dt, .cat) labels May 15, 2024
@mroeschke mroeschke added this to the 3.0 milestone May 15, 2024
@mroeschke mroeschke merged commit bfa4eae into pandas-dev:main May 16, 2024
53 checks passed
@mroeschke mroeschke deleted the perf/ref/accessor branch May 16, 2024 17:21
@jorisvandenbossche
Copy link
Member

While this is considered private and inside pandas.core, this seems to be used quite a bit in the wild in practice, so maybe we could keep the existing CachedAccessor name as an alias for now? (and either deprecate that specifically, or handle that through the generic pandas.core deprecation)

This came up in geopandas, but from a quick github search it seems quite some other projects are using this as well like pyspark, modin, etc

@mroeschke
Copy link
Member Author

Sure added the alias back in #58754

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessors accessor registration mechanism (not .str, .dt, .cat) Performance Memory or execution speed performance
Projects
None yet
3 participants