perf: cache Windows Store normalized symlinks#418
Conversation
Performance Report (Linux) ✅
Legend
|
Test Coverage Report (Linux)
Coverage increased! Great work! |
Performance Report (macOS)
Legend
|
Performance Report (Windows) ➖
Legend
|
Test Coverage Report (Windows)
Coverage increased! Great work! |
There was a problem hiding this comment.
Pull request overview
Improves Windows Store environment identification performance by pre-normalizing symlink paths at discovery/cache-fill time, avoiding repeated normalization work in the try_from hot path.
Changes:
- Introduces a cached wrapper (
CachedStoreEnvironment) that stores pre-normalized symlink paths alongside the discoveredPythonEnvironment. - Updates
try_fromto compare incoming normalized candidates against cached normalized symlinks. - Updates refresh-state sync behavior/tests and adds new tests covering extended-path (
\\?\) prefix matching.
Show a summary per file
| File | Description |
|---|---|
| crates/pet-windows-store/src/lib.rs | Adds cached normalized symlink storage, updates try_from matching logic, and extends unit tests for normalization and refresh-state syncing. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 3
There was a problem hiding this comment.
Pull request overview
This PR improves Windows Store environment identification performance by caching pre-normalized symlink paths during discovery so WindowsStore::try_from can compare against already-normalized candidates in hot loops, while keeping refresh-state sync behavior consistent.
Changes:
- Introduce
CachedStoreEnvironmentto store aPythonEnvironmentplus precomputed normalized symlinks. - Update
WindowsStore::find_with_cache/try_fromto populate and use cached normalized symlink vectors for comparisons. - Add/adjust tests to cover cached vs incoming extended-path (
\\?\) prefix normalization and refresh-state sync behavior with the new cache type.
Show a summary per file
| File | Description |
|---|---|
| crates/pet-windows-store/src/lib.rs | Cache normalized Windows Store symlinks and use them in try_from; update refresh sync state storage type and add normalization/sync tests. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 2
There was a problem hiding this comment.
Pull request overview
This PR improves Windows Store environment identification performance by caching pre-normalized symlink paths during discovery, so WindowsStore::try_from no longer repeatedly normalizes cached paths in hot loops.
Changes:
- Introduce
CachedStoreEnvironmentto store both the discoveredPythonEnvironmentand its pre-normalized symlink list. - Normalize Windows extended-length path prefixes (
\\?\...and\\?\UNC\...) at cache-fill time and compare against normalized incoming candidates intry_from. - Update refresh-state syncing to preserve the cached normalized entries and add targeted tests around prefix normalization and matching.
Show a summary per file
| File | Description |
|---|---|
| crates/pet-windows-store/src/lib.rs | Adds a cached wrapper around discovered Windows Store envs with pre-normalized symlinks; updates try_from/find and refresh-state syncing; adds normalization + matching tests. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
Summary:
try_fromto compare incoming normalized candidates against cached normalized symlinks.Validation:
Fixes #404