Skip to content

[backend] File-tree endpoint walks the filesystem on every request with no caching or depth limit #117

Closed

Description

@devin-ai-integration

GET /workspaces/{id}/tree (server.go:916-943) calls discovery.Tree against the live filesystem on every click of the tree UI — no caching, no rate limit on GETs (the rate limiter only covers mutations), and each call runs pathIncluded/pathPartiallyIncluded which loop the full overrides list per item (O(items × overrides) string matching in treeItems).

On a large tree (node_modules-class directories aren't excluded by default) every expand is a fresh directory walk + full override cross-product in memory. Cache the tree per workspace (invalidate on scan/override change) and pre-index overrides by prefix.

Activity

  1. sanketpatel32 commented on Nov 22, 2026

    @sanketpatel32
    Owner

    Fixed in PR #128 (merged 76e635c, shipped in v0.51.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions