Closed cmrschwarz closed 5 months ago
On vacation. Won't start soon. However, to solve this, it would require another thread to read the directory and sending it to the UI thread. Or going full asynchronous. It's currently fully sync on one thread (not really, but for this it is). Both sounds like pain. Ctrl + C or other signal should be respected tho. Just haven't bothered dealing with them yet.
All good, this is OSS, not a job! Once you had to pkill mdt
a few times you just know not to do that ;).
Just thought its a good idea to have this issue pointed out here.
Wishing you a pleasant vacation.
Any suggestion on which approach sounds best to implement?
Seems like a matter of preference. For my usecases, I think I would slightly prefer the folder browser. I usually have a meaningful folder structure and having all files displayed at once is more overwhelming than convenient. It would also allow mdt to remain single threaded, which is a nice property for cli tools to have. (I guess it's possible to do the search single threaded too using some kind of lazy generator, eh.). But I would be happy either way. I can imagine you went with the recursive search initially because it best fits your workflow, so please don't feel pressured to change that.
It's now fixed. Files gets accessible as it finds them. Some few hiccups I didn't patch this version related to how they are sorted, but yeah, no more loading screen
Observed Behavior
When opening mdt in a large directory (e.g.
/
), it displays aLOADING...
message and becomes unresponsive (even to keyboard events likeq
).Expected Behavior
Mdt should not become unresponsive, and close immediately when
q
is pressed.Open Questions
Instead of displaying a loading screen, it might be nicer (although more work to implement) to immediately start, but lazily populate the list of documents. It would probably be a good idea to use a breadth first search for this, so that the search does not get 'stuck' in some deeply nested directory right away.
Another option would be to display a folder explorer instead of a recursive search.
Should mdt respect
Ctrl+C
as a termination request? It currently doesn't, but maybe should (at least within the loading screen, if we keep that).