Skip to content

Conversation

@heyglassy
Copy link

@heyglassy heyglassy commented Dec 10, 2025

Big fan of your work Tobi, this is very cool!

Issue / Reproduction

QMD is installed globally on a M1 MacBook Pro, with Ghostty.

Running qmd add on a folder with a 14k file subdirectory hangs the qmd process. I isolated this down to the Bun.spawnSync(["realpath", path]); call on line 119.

Running realpath in the same dir with the small bash script below works. Running Bun.spawnSync with realpath does not.

#!/bin/bash
for file in *; do
  realpath "$file"
done

I also tried Bun.spawnSync with the stat command and that worked correctly.

This commit just changes line 119 to a Bun native fs.realpathSync.

Before commit

CleanShot 2025-12-10 at 13 17 59

After commit

CleanShot 2025-12-10 at 13 18 41

@heyglassy heyglassy marked this pull request as ready for review December 10, 2025 21:27
@heyglassy heyglassy changed the title Replace Bun.spawnSync realpath with fs realpathSync to improve index file performance on 14k documents. Replace Bun.spawnSync + realpath with fs.realpathSync to improve index file performance on 14k documents. Dec 10, 2025
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.

1 participant