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
Screenshot processing #22
Comments
Hi there, |
fork() and execv() are very expensive operations. But yeah, forking in other thread should do the trick. |
imho it would be best to just have a plugin callback 2016-07-17 0:30 GMT+02:00 Max notifications@github.com:
|
In current version it is replaced by creating a new thread and invoking system(). Would be nice to know if it works and if it works better. You need however this library for screenshots you can find on forum. |
Alright, I will try to give it a go tonight. |
Did not help at all (tested with empty c program as screenshot processor). I noticed that you now wait till player sees someone to take a screenshot 👍 |
You are saying it still doing lag? |
That's exactly what I'm saying. On 11 August 2016 at 02:33, IceNinjaman notifications@github.com wrote:
|
Okay well then I have no idea how to improve it. Is your host weak in general? |
Don't think so. |
Okay I still can't do anything if launching a new process does load the whole system so much. |
It doesn't load whole system, that's the point. It only makes the server that's currently receiving screenshots lag. Anyway, thanks for trying. |
added a plugin callback to enable a more leightweight screenshot processing and avoid manual parsing. |
Hey. Recently I tried to make use of the
sv_screenshotArrivedCmd
. I wrote a python script to extract meta-data from the screenshot and draw it on the picture itself. Script does it's job, however I experience the lag on the server each time a new screenshot has arrived. It's local lag -- not shared between other game servers I run on the same machine (i.e. only server that's processing screenshots at the time is affected). The lag is noticeable even without lagometer on -- server freezes for a moment so players experience teleporting.Here's short video to visualize the issue: https://www.youtube.com/watch?v=FgIVT6_pOhc (you can see spikes on the lagometer at the moment of console outputting
Screenshot for client ... saved to screenshots/...
).Here are my questions:
execv
? (I couldn't find reliable source on the net.)More info:
I can provide my script if needed, although the issue exists even with empty python script:
or this c program 😏:
The text was updated successfully, but these errors were encountered: