node.js - Nodejs (socket.io) memory usage compared to JavaScript's primitive data type memory usage -


first off, title may poorly defined or misleading, pretty tries summarize question whole.

i've searched lot without getting questions answered.

  1. how socket.io memory allocation through memorystorage (socket.get/socket.set) work , how memory usage approximately 1 socket.set use? memory freed correctly when socket disconnects? optional: there known memory leaks should aware of in v0.11.0-pre?

  2. how javascript's garbagecollector work objects , associative arrays declared in global scope? memory freed when "delete" key-value pair this: "delete object[key];"? or ram continuely increase client requests increase?

  3. how option 1 , 2 compared each other? should use socket.set on globally declared "maps" when comes increasing , freeing memory? optional: how compared each other when comes performance ("executing" socket.get/object[key])?

as basic information on project, i'm developing game server in node.js (single process) expected accept many clients single server can handle (before extending cluster of servers). optional: there else regarding project should aware of when comes load , memory??

thank time, appreciated!


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -