Coder Social home page Coder Social logo

How often to poll WuUpdate about webudp HOT 2 CLOSED

seemk avatar seemk commented on August 20, 2024
How often to poll WuUpdate

from webudp.

Comments (2)

seemk avatar seemk commented on August 20, 2024

I think it depends on the maximum latency you're willing to accept when polling for new data. Currently WebUDP is sending SCTP heartbeats with 4 second intervals. If you're using it in a game, once per frame should be good I guess.

from webudp.

seeme-o avatar seeme-o commented on August 20, 2024

Did a few tests, and here's what I came up with:

3 test runs with 1ms second intervals and 3 test runs with 10ms. They show an increase of min time using the greater interval running roundtrip_histogram.html

test 1, 10ms interval
roundtrip_histogram.html:84 max=34.34 ms
roundtrip_histogram.html:85 min=0.59 ms
roundtrip_histogram.html:86 completed=100%

test 2, 10ms interval
roundtrip_histogram.html:84 max=34.17 ms
roundtrip_histogram.html:85 min=0.54 ms
roundtrip_histogram.html:86 completed=100%

test 3, 10ms interval
roundtrip_histogram.html:84 max=39.05 ms
roundtrip_histogram.html:85 min=0.60 ms
roundtrip_histogram.html:86 completed=100%

test 1, 1ms interval
roundtrip_histogram.html:84 max=37.21 ms
roundtrip_histogram.html:85 min=0.33 ms
roundtrip_histogram.html:86 completed=100%

test 2, 1ms interval
roundtrip_histogram.html:84 max=32.77 ms
roundtrip_histogram.html:85 min=0.38 ms
roundtrip_histogram.html:86 completed=100%

test 3, 1ms interval
roundtrip_histogram.html:84 max=44.98 ms
roundtrip_histogram.html:85 min=0.34 ms
roundtrip_histogram.html:86 completed=100%

One interesting note is that is showed a noticeable performance improvement over the regular EchoServer

EchoServer
roundtrip_histogram.html:84 max=185.61 ms
roundtrip_histogram.html:85 min=0.34 ms
roundtrip_histogram.html:86 completed=89.64999999999999%

roundtrip_histogram.html:84 max=141.45 ms
roundtrip_histogram.html:85 min=0.36 ms
roundtrip_histogram.html:86 completed=82.45%

roundtrip_histogram.html:84 max=238.99 ms
roundtrip_histogram.html:85 min=1.36 ms
roundtrip_histogram.html:86 completed=47.55%

from webudp.

Related Issues (16)

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.