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
Render-time filesystem probes (canonicalize / exists) run per row on the GPUI thread #154
The broader #155 I/O sweep moved operations that can be offloaded away from the GPUI thread, and chat.rs has since been split into chat/mod.rs + chat/model.rs + components — but the synchronous render-path probes remain on current main (e8a5f1cc).
Current evidence
crates/services/src/user_files.rs:5: relativize_to_workspace canonicalizes the workspace root on every call.
Render callers: crates/ui/src/chat/model.rs:560, crates/ui/src/chat/components/changed_files.rs:105, crates/ui/src/diff/view.rs:99 and :182, and crates/ui/src/markdown/view.rs:208.
crates/ui/src/markdown/link_target.rs:49 still calls path.exists() while resolving relative Markdown-link candidates.
Impact
The calls scale with changed-file rows and Markdown links and can repeat as views rebuild. Local filesystems make the cost easy to miss; network or slow filesystems can turn it into visible frame-time work.
Direction
Cache rather than offload:
canonicalize the workspace root once per active cwd/session and pass the resolved root into render models;
keep a small document-scoped link-target existence cache, invalidated on document/base-dir changes (or explicitly accept bounded staleness).
Acceptance criteria
Rendering changed-file rows and Markdown links performs no filesystem I/O.
Cache invalidation is covered when cwd/base directory or Markdown content changes.
A render-focused test or instrumentation check prevents these probes from returning.
Activity
perf(ui,services): cache workspace-root canonicalization and markdown…