-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Support sending batch messages in a single sketchybar -m
call
#17
Comments
For comparison,
|
Yes, there is still something to do in terms of performance, see #4 |
When I run sketchybar 48 times it compares to the time it takes to invoke yabai 48 times quite closely actually. Do you run sketchybar in debug mode with address sanitization turned on? $ bash -c 'time (for i in {1..48}; do sketchybar -m >&/dev/null; done)'
real 0m0.468s
user 0m0.267s
sys 0m0.120s
$ bash -c 'time (for i in {1..48}; do yabai -m >&/dev/null; done)'
real 0m0.424s
user 0m0.279s
sys 0m0.127s So maybe it is enough to speed up the message handling for the duration of the initial loading of the configuration. |
Strange. I use nix to manage macOS, and write some package definitions to compile and run https://github.com/azuwis/nix-config/blob/darwin/pkgs/sketchybar/default.nix
The main different is Maybe nix causes the problem. @cmacrae Any idea?
|
I have never used nix before, how is the source code compiled exactly? Which c flags are used when installing with nix? If it just executes the „make“ command it will produce the very(!) slow debug version of the app. The release flags are only set up correctly when running „make install“ |
I checked the makefile of Can you please move debug related flags to maybe AFAIK, lots of build systems just run |
This is what I was suspecting all along. I have restructured the makefile to create the optimized executable with make 606939d. Is is faster now? |
It's much faster now:
Are you still planning to implement sending batch messages? I'll leave this issue open if so. |
I don‘t think batch messages are a priority right now. I have implemented the ability to „freeze“ the bar on startup, this will improve startup times at bit. Simply add |
Batch messages are implemented 05bc579. See README or updated example sketchybarrc for more info. |
A simple benchmark: Before and after azuwis/nix-config@e0adfe5
It seems each |
The sketchybarrc startup time reduced by 100ms after using batch(azuwis/nix-config@76e623a) 👏
|
Idea for further improvement, batch for multiple bar items:
|
|
Fixed in 24fd74b. |
This is now possible. You can essentially fully configure in one call since 95923db. Should be even faster then. |
Wow, my startup time reduced to 15ms from 250ms(no batch).
|
The current method to config SketchyBar is quite slow. It take 2.4 second for the following simple
sketchybarrc
to finish.~/.config/sketchybar/sketchybarrc
Simply run
sketchybar -m
48 times (same as thesketchybarrc
above) takes about the same time:I suggest add a new
batch
message to send all messages in a single fork:The text was updated successfully, but these errors were encountered: