Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Speed #118

Closed
Joshix-1 opened this issue Jul 23, 2021 · 5 comments
Closed

Speed #118

Joshix-1 opened this issue Jul 23, 2021 · 5 comments

Comments

@Joshix-1
Copy link
Contributor

Joshix-1 commented Jul 23, 2021

2021-07-23_17-25

paleofetch and fastfetch are way faster than uwufetch.

The command: DATE1=$(date +%s%N) ; uwufetch > /dev/null ; DATE2=$(date +%s%N) ; echo "$(expr $(expr $DATE2 - $DATE1) / 1000000)ms"

@ad-oliviero
Copy link
Owner

I know, it's even worse on slower PCs (on the slowest system I own, it takes as long as 20 seconds). It definitely needs optimization, I'm not an expert in optimizing programs, but I think that it could be useful to use multiple threads for getting info.

@dqnk
Copy link
Contributor

dqnk commented Jul 24, 2021

(on the slowest system I own, it takes as long as 20 seconds).

But is that with ASCII art or with viu images? It would be possible to make parts of this program multi threaded, but the main reason why this is slower than paleofetch or fastfetch and can't be insanely optimized as I see it is that it supports so many different systems, not just GNU/Linux on Xorg.

@ad-oliviero
Copy link
Owner

But is that with ASCII art or with viu images?

Just ASCII art:
obviously not my main system, not even my 4th

the main reason why this is slower than paleofetch or fastfetch and can't be insanely optimized as I see it is that it supports so many different systems, not just GNU/Linux on Xorg.

Also there are too many if statements (96 to be precise) and I am pretty sure that this also affects performance.

@Guaxinim5573
Copy link
Contributor

Guaxinim5573 commented Jul 25, 2021

After testing, I saw that pkgman function is the slowest one.
After commenting line 645, this is the result.
image
Both compiled with cc.

EDIT:
Running the same test a few times, and including fastfetch in the results.
image
Without pkgman function, uwufetch is twice as fast as the latest one but still not as fast as fastfetch.

@ad-oliviero
Copy link
Owner

That's a nice result, but on my laptop commenting the same line, I get almost no difference and I don't know why

dqnk added a commit to dqnk/uwufetch that referenced this issue May 11, 2023
…-oliviero#140)

This commit adds the option to read a pregenerated cache, to improve  speed on low spec systems.  The cache system is not fully working (apple users do not get pkg info  and upti    me is not updated) and to use it the `$UWUFETCH_CACHE_ENABLED`  must be set to `TRUE`, `true` or just `1`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants