Open Dominiquini opened 2 days ago
Huh
for some reason it gets stuck trying to count the installed packages
would you mind trying to disable pkg_snap
pkg_flatpak
and pkg_pacman
one by one and see which one is causing the issue?
You can check /etc/xdg/albafetch.conf
for a reference syntax, not sure if the changes will actually be read if you change any settings from that file, pretty sure that's only on -git (actually, I'm not even sure if I implemented that in git or you still have to copy it to your home dir. Should probably check)
I haven't tested the changes you proposed (I can test them later), but I saw here that the application isn't freezing, it just takes a long time to run (more than 2 minutes!) Maybe this option should be disabled by default!
Thanks.
It should totally not take that long, especially if it's just pacman. Could you please tell me what you get as installed packages? pip takes a long time to run, which is why I have disabled it by default
What is taking two minutes though? it can't be pacman, maybe flatpak or snap?
What is taking two minutes though? it can't be pacman, maybe flatpak or snap?
I think it's pacman that's taking too long! I'm using EndeavourOS live and I don't have any flatpak or snap installed! I also didn't install anything using pip!
If you want, I can test here on my PC how long it takes to extract the number of installed packages... Do you know what command I can run here that simulates what the application uses? Let me know if I can help with anything. If you send me a debug build, I can try running it here and send you the result!
Thanks
albafetch basically counts the number of subdirectories inside of /var/lib/pacman/local
, basically just like ls /var/lib/pacman/local | wc -l
(subtracting 2 because of . and .. being counted too). Weird that such an operation is taking this long (unless your disk is really slow, but I don't think that is the culprit)
You can do that with pacman too using pacman -Qq | wc -l
You can get a debug build by cloning this repository and running make debug
inside of it
I run this commands and both are very fast in my PC:
=> time ls /var/lib/pacman/local | wc -l
3560
real 0m0,011s
user 0m0,006s
sys 0m0,008s_
=> time pacman -Qq | wc -l
3559
real 0m0,028s
user 0m0,018s
sys 0m0,032s_
Later I can test the debug version and share the results!
Thanks
Debug (--no-pip):
Debug:
Describe the bug The application gets stuck in the middle of the output
Expected behavior The app should print and exit
Screenshots
Desktop (please complete the following information):
Possibly relevant config lines:
Additional context Installed from AUR - albafetch-bin (https://aur.archlinux.org/packages/albafetch-bin)