Improve performance of hotkey #1228
-
Description
Expected behaviorTo show albert faster. Steps to reproduce
SourceAUR/built from source Debug outputtiming albert show:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
You are using x11 why dont you use the native hotkey? |
Beta Was this translation helpful? Give feedback.
-
I can't set the native hotkey to only the Meta key, so I set the keybinding via Cinnamon. |
Beta Was this translation helpful? Give feedback.
-
You could use netcat to pipe echo -n toggle | nc -U $HOME/.cache/albert_socket
# since 0.21
echo -n toggle | nc -U $HOME/.cache/albert/ipc_socket Some details manuel::mint ~ /usr/bin/time -v sh -c 'echo -n toggle | nc -U $HOME/.cache/albert_socket'
Albert visibility toggled. Command being timed: "sh -c echo -n toggle | nc -U $HOME/.cache/albert_socket"
User time (seconds): 0.00
System time (seconds): 0.00
Percent of CPU this job got: 50%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.00
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1752
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 221
Voluntary context switches: 6
Involuntary context switches: 0
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
manuel::mint ~ /usr/bin/time -v sh -c 'albert show'
Albert set visible.
Command being timed: "sh -c albert show"
User time (seconds): 0.04
System time (seconds): 0.03
Percent of CPU this job got: 92%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.08
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 45128
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 3091
Voluntary context switches: 286
Involuntary context switches: 13
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0 |
Beta Was this translation helpful? Give feedback.
You could use netcat to pipe
show
into the albert socket in your cache dir. nc should be way faster than the albert IPCSome details