Igrom / i3-persist

Extends i3 window management with persistent containers
BSD 3-Clause "New" or "Revised" License
28 stars 2 forks source link

make it faster #6

Open archenemies opened 4 years ago

archenemies commented 4 years ago

I noticed this is a bit laggy (on a Raspberry Pi 4). Most of the time seems to be spent in "remove_expired_container_locks":

$ time i3-persist kill
i3-persist kill  0.14s user 0.14s system 56% cpu 0.490 total

# after commenting out "remove_expired_container_locks"
$ time i3-persist kill
i3-persist kill  0.04s user 0.04s system 49% cpu 0.164 total

However, I'm not sure how I would improve it. Would it be faster in Python? https://pypi.org/project/i3ipc/

N-Parsons commented 4 years ago

Hey @archenemies, you might be interested in j4-persist. It's written in Rust, which is a compiled language, so it's incredibly fast.

You'll need to compile it yourself for your Raspberry Pi, but it should be simple and there are instructions in my README. Feel free to raise an issue in my repo if you have any trouble.

archenemies commented 4 years ago

Thank you @N-Parsons. By the way I tried to email you but it says "Your message to github@tantalum.blue has been blocked."... I will check out your project when I have time. Thanks.