Optimise diff lookup for websockets