JSON is incredibly bloated, but what do you use instead? Many games have some huge configuration file with lots of data about how the game should be run. Think of the items in a shop or the layout of a saga map and you’ll get the picture. This is often a JSON file that will take forever to parse, hog up a bunch of memory, and create a ton of garbage for the GC to collect. Enter CDB: the Constant Database. Unlike other databases, CDB is a simple, read-only, key-value store that’s been around over 20 years! Today’s article introduces the format and provides a one-file script you can drop into your projects and start gaining the many advantages that CDB has to offer.
Posts Tagged JSON
In previous articles I’ve compared the performance of various JSON libraries. Unity’s built-in
JsonUtility usually comes out on top, but that conclusion loses sight of the bigger picture.
JsonUtility is only really fast when you compare it to other JSON libraries. Compared to non-JSON alternatives, it’s ludicrously slow and oversized. Today’s article compares JSON to an alternative format to highlight just how bloated JSON is.
Unity 5.5 has been out for about a month now and it’s time to update the benchmarks for JSON libraries. Which is fastest now? Which creates the least garbage? Read on to find out!
I wrote an article when Unity 5.3 came out to test its built-in JSON serializer library against some of the open source JSON libraries. Today’s article updates with Unity 5.4 and adds a requested JSON library—Full Serializer—to the mix. Has Unity 5.4 improved performance? Is the new version of JSON.NET any faster? Can Full Serializer best them all? Read on to find out!
Last week’s article benchmarked Unity 5.3’s new
JsonUtility class against third-party alternatives LitJSON and Json.NET.
JsonUtility came out the clear winner, but the question arose about how
JsonUtility would fare with bigger or more complex JSON structures. Today’s article answers that question by benchmarking with more types of JSON documents to find out if
JsonUtility can maintain its lead.
Unity 5.3 came out this week and introduced a new, built-in JSON serializer library. Today’s article compares its performance against some popular third-party JSON serializer libraries to see if Unity’s version is any faster. Read on for the results!
describeTypeJSON function is faster than the XML-based
describeType function by default, but we can make it even faster. Today’s article describe just how this is done and achieves a nearly 10x speedup!
flash.utils.describeType has been around since Flash 9 and is the standard way to find out interesting information about a
Class type, including its metadata/annotations. However, there’s a hidden function called
describeTypeJSON that provides an interesting alternative. Since
describeType is notoriously slow, could
describeTypeJSON be the speedy alternative we’ve been looking for? Today’s article puts them to the test!
JSON class that debuted with Flash Player 11 has an interesting feature that few AS3 programmers know about. It turns out that
JSON.parse doesn’t just take the JSON document to parse but also a “reviver”
Function. What is this? How can it be used? Find out more in today’s article and take advantage of this powerful parsing option.