Skip to content
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

Open
poperigby opened this issue Nov 8, 2019 · 9 comments
Open

Informant causes pacman to hang for a few seconds #1

poperigby opened this issue Nov 8, 2019 · 9 comments

Comments

@poperigby
Copy link

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.

@bradford-smith94
Copy link
Owner

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 /etc/pacman.d/

touch /etc/pacman.d/hooks/informant.hook

or a symlink to /dev/null

ln -s /dev/null /etc/pacman.d/hooks/informant.hook

will disable the hook and you can continue to use informant as a standalone tool.

@poperigby
Copy link
Author

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.

@bradford-smith94
Copy link
Owner

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.

@poperigby
Copy link
Author

I think caching it and periodically updating the cache would be a good idea.

@ashpieboop
Copy link

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!

@poperigby
Copy link
Author

That's a good idea

@bradford-smith94
Copy link
Owner

Caching added in AUR version 0.2.0-1.

@codeclem
Copy link
Contributor

Is there any more improvement that can be made here? At this point it seems the bottlenecks are out of informant's control. Should this issue be closed?

@Strykar
Copy link
Contributor

Strykar commented Jul 6, 2022

If the HTTP lookup is taking time, it's not an informant issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants