sasha koshka's profile picture

Published by


Category: Web, HTML, Tech

Does spacehey team know that WebSockets exist?

for some reason the instant messaging service doesn't use websockets to connect, it just continuously polls the server for new updates every 10 or so seconds. this not only causes extreme latency and is hardly instant, but it is doubtlessly putting unneeded load on the server. i'm aware that the instant messanger is in beta but like still, what the??


ok so its actually more interesting the more i look into this. every 30 seconds, the page makes two requests to one is to get the current list of chats, and the other is to load your message history in all of them at once.

now, you may be wondering, does it load the entire message history every 30 seconds??? well... not every 30 seconds. it has a system where it will send the unix timestamp of the last api request so that it only gets new messages sent during that timeframe.

however, it does load your entire message history, for all chats, at once, every time you reload the page. so if you have hundreds or even thousands of messages with someone... well you get the picture.

an, for the love of god please use websockets!

6 Kudos


Displaying 0 of 0 comments ( View all | Add Comment )