code optimizations, efforts to counter desync