Skip to content

perf(cli): skip the parent listing when a drive folder has entries - #220

Merged
tejapulagam merged 1 commit into
mainfrom
lk/dont-list-parent
Oct 29, 2026
Merged

tejapulagam merged 1 commit into
mainfrom
lk/dont-list-parent

Conversation

@lianakoleva

@lianakoleva lianakoleva commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

lightning ls listed a folder's parent to confirm the folder exists, then listed the folder again for its contents, so every directory listing cost two drive requests. this is especially costly when the parent of a large folder is large (common when listing studio/<studio-name>). a non-empty folder listing now returns directly. the parent is only listed when the folder's listing is empty or fails, since an empty folder, a file, and a missing path look the same from the folder alone.

evidence

timing command (averaged over 5 runs): /usr/bin/time -p lightning ls lit://lightning-ai/thunder/studios/zero-to-thunder-xtsp/

real user sys
before 2.11 0.56 0.15
after 1.58 0.44 0.11

@tejapulagam
tejapulagam merged commit c7fca92 into main Oct 29, 2026
24 checks passed
@tejapulagam
tejapulagam deleted the lk/dont-list-parent branch October 29, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants