·
·
255 views
· ·

Say Goodbye to Space Sniffer

This article is translated from Chinese by LLM.

Despite checked and polished the translation, some inaccuracies may be included.

This article is part of Myriad Dreamin Blog 2025-05.



Space Sniffer is a great tool, but recently I became dissatisfied with its slow speed and developed my own scanning tool. The release page is here.

Backend API: Event Iterator

I divided shr into frontend and backend. The backend takes parameters, scans the filesystem, and returns an iterator where each item is an event update, allowing the frontend to continuously fetch events from the iterator to update the UI.

CLI Frontend

shr-clishr-cli is a dudu-like command-line tool using shr's backend API. It supports all major platforms.

Slint GUI Frontend

shr-browsershr-browser is a Slint GUI utilizing shr's backend API. Surprisingly, it also supports all major platforms.

Figure 1: Slint GUI

Performance

On my machine, shr-browsershr-browser is about 6.1% faster than the existing tool dustdust (77 seconds vs 82 seconds). This doesn't seem to be a significant advantage.

Potential Improvements

The IO bottleneck in shrshr lies in std::fs::read_dirstd::fs::read_dir; potentially a better backend like compio could replace tokio.

The memory bottleneck comes from storing too many full paths. Testing with 5000k files (800GB) showed  1.5GB memory usage. This means 45GB RAM could support previewing 32TB – sufficient for full-disk scanning. Future improvements may prioritize this.

Afterword

I've used it several times – fast and smooth UI. But during scans, I mostly encounter massive cargo cache usage. Feels like I just need a good cargo cache cleaner.

Comments

  1. 云楼汐 [@] at [reply]

    可以试试WezTree,也很快 :)

  2. paran3xus [@] at [reply]

    好像是WizTree罢

  3. Kamiya [@] at [reply]

    @comment:7

    好像是WizTree罢

    @paran3xus @云楼汐 确实,可以试试。另外,之前看WizTree只能在windows上运行,但是slint和我写的scanner能在所有小众平台上运行。