5 ms·
Is there any significant performance penalty using WM built in Python?
by butz 6y ago
Is there any significant performance penalty using WM built in Python?
- heavyset_go 6y agoCouldn't really imagine there being any. WM events are few and far between, and are hardly constrained by single thread performance.
- sqrt17 6y agoIt's a WM (Window Manager). It only sets the placement of windows, it does not interfere with the programs themselves (that's what systemd and gnome-session do) nor does it do the fancy part of the painting (that's what a compositor does). So no, do not expect a significant performance penalty.
- vmchale 6y agoCurious how the garbage collector works.
- mikelward 6y agoI used a Go-based window manager called Wingo for quite a while and never noticed any performance issues.
- pjmlp 6y agoGo is also fully compiled to native code, big difference.
- yjftsjthsd-h 6y agoBut it's still garbage collected. And GC should be done by the python interpreter proper, so it would be in native code.
- pjmlp 6y agoA tiny portion of Python's total execution time.
- yjftsjthsd-h 6y agoDon't get me wrong; I expect Go to be far more performant than Python. Just, they're both garbage-collected, and I have no reason to expect GC perf (specifically) to differ.
- pjmlp 6y agoWhich just shows that learning about GC algorithms is a must. http://gchandbook.org/ http://gchandbook.org/ And the differences between value types, AOT compiled code execution, bytecode interpreters and FFI marshalling costs between bytecode interpreters and native libraries.
- YarickR2 6y agoHaving done tiling WM with lots of logic implemented in Lua myself, ten or so years ago, I never met any performance issues, besides repainting of dragging indicators for free floating windows
- pmiller2 6y agoTake a look at the requirements.txt: https://github.com/qtile/qtile/blob/ecf216205ccfe72bbdee3183489ad0b67eef0100/requirements.txt https://github.com/qtile/qtile/blob/ecf216205ccfe72bbdee3183... All the heavy lifting is offloaded to C libraries. So, no, you shouldn't see a significant performance penalty, unless your Python WM is doing bitcoin mining in the background or something.