ID:2677608
 
This week has absolutely flown by, but not fast enough. I can't wait to get past this horrible weather into something less horrible.

It's been a very interesting time here, looking at all the profiling data that's come in and using it for improvements. One of the things I discovered is that the data is less reliable than it could be, and one of the reasons appears to be the timing involved. For some time now my most accurate timing has been trying to combine two system clocks to find the best possible compromise, but there's actually a routine available in Windows 8+ that should solve all of that, so I decided to amend the code. Don't worry, though: Windows 7 users should be fine a little longer because the change I made can fall back on the old method.

Anyway, I've been working hard on making optimizations on both the client side of the engine, where the improved timing information has helped clarify some things, and the server side. I'll talk about the client side more in today's early-access Patreon post.

On the server end of things, I haven't yet plugged in some of the code I was working on for improving the way obj and mob data is sent. I'm less convinced now that it's as big a deal as I thought, but examining movables and comparing them definitely needed work. I made a modification there that should avoid the lion's share of the work it was doing for each object, if that object hasn't had any important changes that would impact what the client should know about it. This involved adding a "touch counter" to each movable, and any important visual changes (with one exception) will increment the counter. If the server's MapObject data for what the client last saw has the same touch counter, it doesn't have to go any further comparing all that object's data to what it had before.

Besides that, I also realized the turfmap sending is much slower than it needs to be, and the main reason is that the area message is handled separately but involves basically the exact same loops through turfs. This was very inefficient, so even though the messages are still separate I combined the code that handles them so the turfs only need to be looped through and looked up once. This however is the change I'm least sure about, because the message format was never given a "this data is done" indicator and boy are there a lot of ways for it to screw up. I already found a major one, but I actually think that was the only issue and odds are everything is gonna be fine.

The improvements I've made on the server are indicating roughly 30-35% improvement on turfmap sending and examining movables, and this seems to translate to roughly a 20% improvement in per-client SendMaps numbers. However I should caution all that those numbers are rough and come from just one test case (an SS13 codebase where no one else was on, just walking around the map as an observer), so the numbers for any given project may be completely different. What's for certain is that it should be decently faster for all projects across the board, just a question of how much.

As always my thanks go out to the BYOND Members and supporters who make all this work possible. It's been a decent month and I'm grateful to all of you who made it that way.

Hopefully warmer days will be upon us soon, and maybe more of us can get out of the house this year. After working on games, of course. Make the most of your weekend, and I'll see you next week!