Giter Club home page Giter Club logo

Comments (3)

tjcouch-sil avatar tjcouch-sil commented on June 22, 2024

Node vs C# websockets

It seems from some testing that different socket connections run on different threads in C# without any particular configuration. They seem to swap to different threads sometimes. I'm not clear on what the implications are of this discovery, but I don't believe Node websockets are multithreaded. There must be some locking and unlocking when reading/writing the messages in C# or something. I suppose you could write something to implement such functionality in Node.

EDIT: async/await creates new tasks and may schedule on different threads. So doing things with websocket messages is pretty much inherently multithreaded in C#. This feels much more natural than having to do things to make this happen in Node, but it can still be done.

Resource usage

In Windows 10:

Express:
Start server then navigate to website url: ~1.5-2 seconds
Uses ~45-50 MB memory

ASP.NET:
Start server then navigate to website url: ~.5 seconds
Uses ~28-31 MB memory

from paranext.

irahopkinson avatar irahopkinson commented on June 22, 2024

@tjcouch-sil I asssume the above results are on Win 10? Do we see similar results on Linux and MacOS? Using WSL2 or dual boot to Linux would be a fair comparison since its the same machine but I'm not sure how you make the comaprison on MacOS. We need to be continually thinking x-platform, perhaps we should determine a way to make a fair comparison.

from paranext.

tjcouch-sil avatar tjcouch-sil commented on June 22, 2024

@irahopkinson Yes, that was in Windows 10. Good clarification. I don't have the experience with WSL2 to do much with Linux right now. Maybe we can investigate those further another time. Looks like the electron-edge-js test was successful enough that the startup time will not be that significant a difference (server startup time would affect websocket communication with external executables like FLEx, but internal apis do not need to wait on the server if we use edge as everything is passing through electron ipc and edge).

from paranext.

Related Issues (9)

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.