Git Product home page Git Product logo

Comments (2)

kanaka avatar kanaka commented on May 18, 2024 3

The "slower or disabled" part is because there are 4 different python modules that are optional and checked using the same code at the top of websocket.py. For example, if the ssl module is not found, then TLS/wss is disabled. I just pushed a change that will make this clearer.

Numpy is definitely faster. Using the tests/latency.py + tests/latency.html test I get the following results (with 10ms send delay and just running on localhost):

Packet size 2000 bytes:

  • 0.8ms avg roundtrip latency with numpy
  • 1.6ms avg roundtrip latency without numpy

Packet size 20000 bytes:

  • 2.5ms avg roundtrip latency with numpy
  • 9.2ms avg roundtrip latency without numpy

Packet size 100000 bytes:

  • 6.3ms avg roundtrip latency with numpy
  • 40.1ms avg rountrip latency without numpy

In addition, with 100kb packet sizes, no only is the latency more 6 times higher without numpy, but the server starts to get behind and the client has to back off repeatedly during the test.

Note that numpy really only affects client->server data unmasking, so for uses like noVNC it will be basically irrelevant. However, websockify is not just for noVNC, so in the case where the client is sending a lot of data to server, numpy provides significant performance improvement.

from websockify.

astrand avatar astrand commented on May 18, 2024 1

Thanks!

from websockify.

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.