Skip to content

perf(file-browser): Migrate cachedDir to Map to prevent V8 hidden class degradation - #2829

Closed
AuDevTist1C wants to merge 1 commit into
Acode-Foundation:mainfrom
AuDevTist1C:perf/fb-dir-cache-map
Closed

perf(file-browser): Migrate cachedDir to Map to prevent V8 hidden class degradation#2829
AuDevTist1C wants to merge 1 commit into
Acode-Foundation:mainfrom
AuDevTist1C:perf/fb-dir-cache-map

Conversation

@AuDevTist1C

@AuDevTist1C AuDevTist1C commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

@greptile-apps

greptile-apps Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Replaces the file browser’s object-based directory cache with an ES6 Map.

  • Converts cache initialization, lookup, insertion, deletion, and scroll-state access to Map APIs.
  • Keeps reload invalidation centralized in reload().

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/pages/fileBrowser/fileBrowser.js The directory-cache migration is internally consistent, and the previously reported out-of-scope cache key has been corrected to dir.url.

Reviews (2): Last reviewed commit: "perf(file-browser): Convert directory ca..." | Re-trigger Greptile

Comment thread src/pages/fileBrowser/fileBrowser.js Outdated
Replace the plain object container used for cached directories with an ES6 `Map` to improve key lookup operations and key management semantics.

Update cached directory data structure (`src/pages/fileBrowser/fileBrowser.js`):
- Re-initialize `cachedDir` variable as a `Map`
- Replace object property lookups with `Map.prototype.has()` and `Map.prototype.get()`
- Update cache writes to use `Map.prototype.set()`
- Update directory deletion calls to use `Map.prototype.delete()`

(AI generated commit message)
@AuDevTist1C
AuDevTist1C force-pushed the perf/fb-dir-cache-map branch from 928a14a to cc77253 Compare August 29, 2026 10:15
@bajrangCoder

Copy link
Copy Markdown
Member

remove the invented-looking benchmark table and GC/V8 claims.(the whole pr title + body is just slop there is nothing meaningfull)

I'm closing this pr open new with real pr title , body instead of these slop otherwise I'll block

@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants