Aerospace current IPC is slow and should be extended. #1793
SacrilegeWasTaken
started this conversation in
general
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there!
I’m developing an app that integrates with AeroSpace and noticed that tasks executed through configs like:
run quite slowly. For example, polling three aerospace-cli commands every 0.2 seconds feels noticeably faster in comparison.
I think we could improve this by introducing shared memory access for workspace data. Each time the workspaces state changes (workspace count, opened/closed apps, etc.), AeroSpace could copy the current
Workspace.allinto shared memory. Then, any external process could read this data directly and get updates instantly — a radical but very efficient IPC mechanism. Also this solution needs to be coveted with semaphores or betterpthread_rwlock_tSwift analogue to avoid data races.Alternatively, improving the performance of the existing mechanism would also help.
Another option could be adding an exec-on-workspaces-update configuration, which triggers a command whenever workspace data changes, or perhaps separate exec-on-xxx hooks for each type of update. This would let side applications react quickly using lightweight aerospace-cli calls.
Beta Was this translation helpful? Give feedback.
All reactions