-
Notifications
You must be signed in to change notification settings - Fork 13
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
Informant causes pacman to hang for a few seconds #1
Comments
Thanks for using informant! What you describe is expected. This is a side-effect of the included pacman hook. When it runs it needs to make a web request to https://archlinux.org/feeds/news (I don't cache this and it will run every time the hook is called). The time of this web request could be of varying speed depending on your internet connection. I built the pacman hook as a feature so that I never had to remember to check the news, but if you dislike the time the hook takes to run it is possible to disable the hook. I tried to write a bit about this in the README - basically either placing an overriding hook in
or a symlink to
will disable the hook and you can continue to use informant as a standalone tool. |
Yeah I knew about the hook. It's unfortunate it causes it to hang. I wonder if their's any way to speed it up. |
I haven't come up with any ideas to make it faster. Some sort of caching could help with multiple calls to informant in a short time period, but it also depends on the response time of the archlinux news feed. I'm open to ideas for improving it if you or anyone else has them, pull requests are welcome too. |
I think caching it and periodically updating the cache would be a good idea. |
Hey, you've got to respect data integrity! What would be acceptable imho would be to cache and only full fetch when there is an actual repository update. Though there are also etags! |
That's a good idea |
Caching added in AUR version |
Is there any more improvement that can be made here? At this point it seems the bottlenecks are out of |
If the HTTP lookup is taking time, it's not an informant issue. |
I'm not sure if this is supposed to happen, but when I run a pacman command, when it hits "Checking ArchLinux news", it hangs for a few seconds before moving on.
The text was updated successfully, but these errors were encountered: