Re: [tsc-devel] Binary versus XML for the levels...

Quintus | Thu, 29 Oct 2015 22:08:37 UTC

datahead <…r@f…> writes:

> He pointed out this is a standard practice in many production game
> companies and that he would expect out level loading to be slow
> without this.

libxml2 loads XML faster than an average binary file loader can load a
binary file, because it is a highly optimised library with years of XML
parsing efforts that went into it. So unless you spend a lot of time in
creating a sophisticated binary file format parser, you’re going to have
a hard time in beating libxml2’s performance, especially as we use the
SAX parser and not the DOM-based one (i.e. the XML is traversed exactly
once).

Apart from that I find binary file formats a nightmare for debugging
purposes. Without really good reasons I don’t think this is a good idea.

Vale,
Quintus

-- 
#!/sbin/quintus
Blog: http://www.guelkerdev.de

GnuPG key: F1D8799FBCC8BC4F