-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
gopass show
incredibly slow
#1569
Comments
It appears that this only applies to the |
Interesting. Thanks for reporting. I haven't noticed such behaviour myself - but I rarely use the copy flag. |
You might want to run with |
Maybe we should try and setup a benchmarking CI check for the standard operations, it should be fairly easily using Go built-in |
Hmm, not sure I can follow. Would you propose to add micro benchmarks for any CLI subcommand? Not sure how that would work. But happy to consider a PR if you send one. |
Yeah, I'll try to create a couple benchmarks in the coming month :) |
There is quite a big difference between pass and gopass, when copying to the clipboard: % time pass -c forum.artixlinux.org
Copied forum.artixlinux.org to clipboard. Will clear in 45 seconds.
pass -c forum.artixlinux.org 0,04s user 0,03s system 52% cpu 0,130 total
% time gopass -c forum.artixlinux.org
✔ Copied forum.artixlinux.org to clipboard. Will clear in 45 seconds.
gopass -c forum.artixlinux.org 1,94s user 0,55s system 295% cpu 0,845 tota 0.13 s with pass vs. 0.85 s with gopass! |
I did exactly that (and added a few more debug flags), and the longest time is spent on this if-statement: gopass/pkg/clipboard/clipboard.go Line 51 in 4ff8832
EDIT: gopass/pkg/clipboard/clipboard_others.go Line 24 in 4ff8832
Can someone please explain why this is done in the first place? Why do we clear the clipboard before writing the password to it? Why do need to hash something? What is going on here? Who am I? EDIT2: |
@BoostCookie |
Summary
The
gopass show
command takes a very long time.This applies to the time it takes to find the entry (i.e. how long it takes to print
Found exact match in...
), to the time it takes to decrypt the entry (i.e. delay before asking for password and delay before copying to clipboard) and to the time it takes to stop the program (i.e. delay before the shell becomes responsive again).However, this seems to only apply to the
show
command. Others, likelist
and evenfind
work fine.Steps To Reproduce
I do not know how to reproduce.
Expected behavior
The command should be fast.
Environment
Linux arch 5.8.5-zen1-1-zen #1 ZEN SMP PREEMPT Thu, 27 Aug 2020 18:52:58 +0000 x86_64 GNU/Linux
pacman
Additional context
Running under KDE Plasma 5 using bspwm.
The text was updated successfully, but these errors were encountered: