Okay, I've got the first iteration hammered out on git, it needed about 1800 lines worth of changes too, and that's not even including the files moved around.
It's ready for testing if anyone wants to go ahead, but it's not yet on the sandbox SVN, I'll do that once kddekadenz and friends have had some time to test it.
Anyways, I'd like to revisit the cons I provided in the opening post, with an implementation, they don't all hold up.
Hirato wrote:Backwards compatibility will be completely and irreparably broken; you will need to PLACE ALL OF YOUR ENTITY SPAWNS AGAIN
I was able to make the maps fully backwards compatible, so yay, no need to redo their spawns.
I since edited it out to exclude the need to update the game data, but that is false. Game data is about 80% compatible at best; If you explicitly set the factions, scripts, particle effects, and other misc stuff without using the magical "-1" value, you should have very little to worry about. On the other hand, if you primarily depend on the defaults you'll need to update them.
Hirato wrote:Increased Memory Usage (minimal)
It is very minimal; almost all of the fields in the structures are still the same size, but each entry now has an extra pointer (4/8 bytes), and there is also the new hashpool which is a centralised area for all the hashes, this also has some memory overhead, but it prevents successive allocation of the hashes/strings from using more memory; in other words it actually gives us rather big wins as far as that goes.
Memory use is still higher, but if anything, it'll be <1 MB for just about anything people will actually use sandbox for; this'll probably reach a few MB for something "professional"
Hirato wrote:Decreased Performance (minimal)
As strings are used, these need extra dereferencing operations, hashes need to be calculated, and then they are looked up in their respective hashtables, this is probably at least 8 times as expensive as a direct lookup on average, but it's done relatively infrequently, the big and noisy "update" signal aside.
Of course, this gets worse with longer strings/hashes, a hash is much easier to calculate from a 5 character string than one that is 20 characters long.
In the grand scheme of things, it's still really minor.
Hirato wrote:Less strict conformance checks!!
Completely false, they're technically even stricter now, bwahaha~!
Still need to add some post-init checks; mostly to avoid having savegames bail out from reading an invalid script hash and the like.