News for hackers. Stuff that matters.
Re:Hand Tracking for Mouse Input by aranelsurion on Tuesday November 19, 2024 @01:38PM (#42186730)
> Python version is super laggy, something to do with OpenCV

Most probably I'm wrong, but I wonder if it has anything to do with all the text being written to stdout. In the odd chance that it happens on the same thread, it might be blocking.

Re:Hand Tracking for Mouse Input by ikanreed on Tuesday November 19, 2024 @01:46PM (#42186797)
Could it then be resolved by using the no-gil version of python they just released?
Re:Hand Tracking for Mouse Input by mananaysiempre on Tuesday November 19, 2024 @01:59PM (#42186900)
I’m not sure what your reasoning is, but note that blocking I/O including print() releases the GIL. (So your seemingly innocent debugging print can be extremely not harmless under the wrong circumstances.)
Re:Hand Tracking for Mouse Input by reynaldi on Wednesday November 20, 2024 @03:36AM (#42191871)
Hmm, I couldn't remember if I tried it without the text being written to stdout. But that's an interesting point, I just didn't expect the print() blocking to be significant.