Giter Club home page Giter Club logo

Comments (13)

IceNinjaman avatar IceNinjaman commented on May 11, 2024

Hi there,
I have to admit to not having tested this feature. Isn't it fork() + execv() ?
If your cod4server process start to lag it is probably caused by a function call which does block for some time. Maybe fork() is doing this? Although fork() is part of many daemons you can find on *nix systems. There a little bit lag is maybe not the issue? I don't really know how to do it better.
Creating a new thread to fork() then?

from cod4x_server.

T-Maxxx avatar T-Maxxx commented on May 11, 2024

fork() and execv() are very expensive operations. But yeah, forking in other thread should do the trick.
https://github.com/D4edalus/CoD4x_Server/blob/master/src/unix/sys_unix.c#L108

from cod4x_server.

D4edalus avatar D4edalus commented on May 11, 2024

imho it would be best to just have a plugin callback

2016-07-17 0:30 GMT+02:00 Max [email protected]:

fork() and execv() are very expensive operations. But yeah, forking in
other thread should do the trick.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/D4edalus/CoD4x_Server/issues/22#issuecomment-233154384,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARP0TDtGF4bzkqYMyFoUg1t9lM4y6K3Wks5qWVuHgaJpZM4JLnTg
.

from cod4x_server.

IceNinjaman avatar IceNinjaman commented on May 11, 2024

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.

from cod4x_server.

florczakraf avatar florczakraf commented on May 11, 2024

Alright, I will try to give it a go tonight.

from cod4x_server.

florczakraf avatar florczakraf commented on May 11, 2024

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 👍

from cod4x_server.

IceNinjaman avatar IceNinjaman commented on May 11, 2024

You are saying it still doing lag?

from cod4x_server.

florczakraf avatar florczakraf commented on May 11, 2024

That's exactly what I'm saying.

On 11 August 2016 at 02:33, IceNinjaman [email protected] wrote:

You are saying it still doing lag?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/D4edalus/CoD4x_Server/issues/22#issuecomment-239045749,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIna09NFmEqsAe17tFS4B0DGu4H5D2qVks5qem33gaJpZM4JLnTg
.

from cod4x_server.

IceNinjaman avatar IceNinjaman commented on May 11, 2024

Okay well then I have no idea how to improve it. Is your host weak in general?

from cod4x_server.

florczakraf avatar florczakraf commented on May 11, 2024

Don't think so.
CPU: Intel Xeon E3 1245v2 4 cores/ 8 threads 3.4 GHz+
RAM: 32GB DDR3
DISK: 2 x 2 TB SATA (soft raid)
We host some cod4 server, ts, some webtools, and a minecraft server there. Low resource usage.

from cod4x_server.

IceNinjaman avatar IceNinjaman commented on May 11, 2024

Okay I still can't do anything if launching a new process does load the whole system so much.

from cod4x_server.

florczakraf avatar florczakraf commented on May 11, 2024

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.

from cod4x_server.

D4edalus avatar D4edalus commented on May 11, 2024

D4edalus@8a0a312

added a plugin callback to enable a more leightweight screenshot processing and avoid manual parsing.

from cod4x_server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.