Quote Originally Posted by scooper View Post
Why not just separate it into two programs that share a database, or use the slocate database? I wouldn't think you need to run find very often, just after stuff is installed. You could spawn an independent sub-process (not a thread) that rebuilds the database in the background and then swaps it in place as an atomic operation when the search completes. Or there might be a way to parse /var/lib/slocate/slocate.db, except it needs root access.

I also don't find it very hard to write code to recursively find files directly in Python, i.e. without spawning find. Here's a simple example.

Obviously there's room for improvement, but just showing how easy it is. A benefit is that once you control the iteration of files internally you can poll the GUI to keep things alive. Does that make sense?
Find isn't something I made, Its a program installed by default on every Ubuntu and most Linuxes. And its not like locate, where it generates a index, it polls the filesystem every time you call it. So I would need to call find each and every time I did a search.