Category : performance

Ok, so i started to create a multiplayer browser game (.io game) with socket.io because at the begining i helped me from a tutorial who was using it. Today, I came across an article that said that socket.io is slow and add unnecessary things (https://alexhultman.medium.com/moving-from-socket-io-to-%C2%B5websockets-js-a85753b93a5a). I need the best performances for the players get the ..

Read more

I wanted to find out if there was a faster way to select a DOM element by its id, rather than document.getElementById. I did some research and found that I could select an id by its global namespace. Instead of doing this: <div id="myElement"></div> <script> console.log(document.getElemenetById(‘myElement’)); </script> I could do this: <div id="myElement"></div> <script> console.log(myElement); ..

Read more