Skip to content

chore: Upgrade to fff 0.9 and reenable watcher#18332

Merged
fdncred merged 2 commits into
nushell:mainfrom
dmtrKovalenko:feat/fff-0.9
Jun 3, 2026
Merged

chore: Upgrade to fff 0.9 and reenable watcher#18332
fdncred merged 2 commits into
nushell:mainfrom
dmtrKovalenko:feat/fff-0.9

Conversation

@dmtrKovalenko
Copy link
Copy Markdown
Contributor

@dmtrKovalenko dmtrKovalenko commented Jun 3, 2026

Description

This PR updates fff to 0.9 and does a little bit of changes to the daefult config: specifically enable indexing by default which is the main reason fff is so fast, here is an example on the index directory

idx init .
timeit {idx search MAX_FILE_SIZE}
355ms 288ms 21ms

idx init . --no-content-indexing
timeit {idx search MAX_FILE_SIZE}
4s 874ms 113ms

I think if the user is starting the idx command they likely are ready for an additional resources spent on storing the index

you might be interesting in the upcoming persisted index mode that
does indexing but stores it in the memory mapped file and allowing to restore it between the sessions

@fdncred this PR is simply enabling the watch mode and it just works, I verified on macos and linux - I didn't face any issues

Screen.Recording.2026-06-02.at.21.33.29.mov

This PR updates fff to 0.9 and does a little bit of changes to the
daefult config: specifically enable indexing by default which is the
main reason fff is so fast, here is an example on the index directory

```sh
idx init .
timeit {idx search MAX_FILE_SIZE}
355ms 288ms 21ms

idx init . --no-content-indexing
timeit {idx search MAX_FILE_SIZE}
4s 874ms 113ms
```

I think if the user is starting the idx command they likely are ready
for an additional resources spent on storing the index

> you might be interesting in the upcoming persisted index mode that
does indexing but stores it in the memory mapped file and allowing to
restore it between the sessions

@fdncred this PR is simply enabling the watch mode and it just works, I
verified on macos and linux - I didn't face any issues

https://github.com/user-attachments/assets/5d890d7a-3c8a-4936-b094-057387f388ad
@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Jun 3, 2026

oh, hi @dmtrKovalenko! Nice to see you here. When I first wrote these commands, there was nothing I could do to get the watcher to work. Glad it's working now. I'll take a look at this soon. Appreciate the PR ❤️.

you might be interesting in the upcoming persisted index mode that does indexing but stores it in the memory mapped file and allowing to restore it between the sessions

I kind of have some of that already with the idx export and idx import. So, you're saying that it'll do this natively after your upcoming change? Sounds cool! I write it out to a sqlite file so people can play with it with nushell's built-in sqlite tools (open, schema, query db). It doesn't have indexed contents though. Just files and dirs.

@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Jun 3, 2026

I looked through it, fixed a test, and added a flag to import, hoping it works. Thanks for submitting this! I think it would be really cool to support import/export natively if you decide to go that way. Kind of wondering how my sqlite import/export will still work after that.

@fdncred fdncred merged commit c19a069 into nushell:main Jun 3, 2026
33 of 34 checks passed
@github-actions github-actions Bot added this to the v0.114.0 milestone Jun 3, 2026
@dmtrKovalenko
Copy link
Copy Markdown
Contributor Author

Cool! Yes basically what I am working on right now is an ability to

  1. keep the index and file table in the file
  2. ability to persist it and reuse the index between sessions
  3. ability to incrementally update the index (so you don't need a full rebuild if we know that the files are not changed since the last visit)

@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Jun 3, 2026

Sounds very cool. Would be great to be able to persist to sqlite but I worry that it wouldn't be performant enough for your tools.

nidara-duo pushed a commit to nidara-duo/nushell that referenced this pull request Jun 5, 2026
## Description

This PR updates fff to 0.9 and does a little bit of changes to the
daefult config: specifically enable indexing by default which is the
main reason fff is so fast, here is an example on the index directory

```sh
idx init .
timeit {idx search MAX_FILE_SIZE}
355ms 288ms 21ms

idx init . --no-content-indexing
timeit {idx search MAX_FILE_SIZE}
4s 874ms 113ms
```

I think if the user is starting the idx command they likely are ready
for an additional resources spent on storing the index

> you might be interesting in the upcoming persisted index mode that
does indexing but stores it in the memory mapped file and allowing to
restore it between the sessions

@fdncred this PR is simply enabling the watch mode and it just works, I
verified on macos and linux - I didn't face any issues


https://github.com/user-attachments/assets/5d890d7a-3c8a-4936-b094-057387f388ad

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
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.

2 participants