You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 733ab9e
Browse filesBrowse the repository at this point in the historyBrowse files
perf: cache static identifiers to avoid per-call interner locks (#8614)
## Summary
`id()` methods for encodings, scalar/aggregate functions, layouts and
extension dtypes built their `Id` via `Id::new`/`Id::new_static`, which
interns into a globally locked table (`ThreadedRodeo`) on every call. As
noted in #8380 this made identifier construction a hot-path bottleneck
under multi-threaded and random access. They now read a `CachedId`
static that interns once on first access and returns the cached `Id`
lock-free thereafter; the interned value is unchanged, so encoding and
serialization behaviour is identical.
This is the migration half of #8380; the workspace `clippy` lint that
forbids the locking constructors (so the regression can't return)
follows in a separate PR.
Refs: #8380
## Testing
`cargo nextest run -p vortex-session -p vortex-array -p vortex-layout -p
vortex-geo -p vortex-tensor -p vortex-json` passes; `cargo +nightly fmt
--all --check` and `cargo clippy --all-targets` clean. `vortex-cuda`
could not be built locally (no CUDA toolchain); its one migrated `id()`
uses the same pattern.
---
I'm Korean, so sorry if any wording reads a little awkward.
Signed-off-by: Han Damin <miniex@daminstudio.net>
0 commit comments