-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why the AppsScanInterval? #13
Comments
Thanks, I've been following Ulauncher. When I finally chose to write my own launcher I did take a closer look at the Ulauncher code base, but found many parts of it too complicated and chose to copy only some things like how to do theming, how to setup a global keybinding, how to show or hide the window when the global key is pressed etc. Regarding the scan interval: I haven't measured it at all, I have just assumed it has to actually scan the desktop file directories. But I guess I could check, I have a hook that can be run by the plugin when showing the window, which could be used here. I don't see anything in the documentation on how I'm also using the |
I think you made the right call to start from scratch. I couldn't have done the same when I took over the maintenance, because I lacked the GTK experience. But I'm sure I spent more time refactoring Ulauncher than it would have taken to write from scratch if I had that experience. There's a lot left to improve too, but you can't move very fast without breaking compatibility and tests. The AppInfoMonitor documentation says this:
I never read this before, but it's similar to your implementation and reasoning. However, you are still running If you know C (I don't), this is what they do (get_all is listed just below search): https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L4701-L4837 |
The mentions in the documentation about being "expensive" could also refer to Windows or Mac, where they might have a different setup, but I don't need to worry about that. Thanks for noticing, this should be a lot better. |
Really nice work on Catapult 👍 I'm the current maintainer of Ulauncher, and stumbled into Catapult on the AUR. Since Catapult was built with very similar purpose and tech stack as Ulauncher it was interesting to look under the hood :) I've been making a lot of effort to get Ulauncher more performant and minimalistic in the upcoming major release, so it'll actually be more similar to Catapult (but definitely not as performant or minimalistic as Catapult, because of our extension API, process isolation and web-based preferences).
Anyway, one thing I don't understand is the
AppsScanInterval
in the apps plugin. When you install an app as Catapult is running, there's a timer (defaulting to 15 minutes and min value 1 minute) until it updates. I know you can reload the plugins, but that's the sort of thing that confuses new users. Have you tried actually measuring how much of a performance bottleneck it would be to just reindex instantly? Unless I'm very mistakenGio.AppInfo.get_all()
doesn't do anything resource intensive like indexing files. It just returns a cache. Ulauncher v6 even runs it on every keypress, so I think I would have noticed if it was slow.The text was updated successfully, but these errors were encountered: