Google Code-In 2014
Task Preview
Waf: Fast serialization extensionCopyleft Games Group
STATUS: DRAFT

Large game projects often seggregate the compilation of code (C/C++) from the compilation of assets (textures, navmeshes, etc). As building assets requires tracking possibily hundreds of thousand of files, the default Waf system becomes impractical (files are hashed with MD5 whenever a build starts). Besides hashing performance, the hash size also increases the size of the project database file (.wafpickle).

The goal of this task is to create a Waf tool and to measure its effect on performance on a few benchmarks and to answer the following question: "for which project size is it better to use fnv64 over md5?". This tool will use dynamic code replacement (also known as monkey patching) in order to enable testing of several hash functions and to avoid changing the code in the Waf library. The start point is the function h_file in the module Utils.py, a few hashing functions to use will be provided by another project (pyfasthash for example). Once the tool is ready, create a waf project that will create waf projects of different sizes and measure the startup time of the waf process when the build is up-to-date. Some inspiration can be taken from the example in playground/compress (draw graphs with Gnuplot) and utils/genbench.py (generate Waf test projects).

When done, add the source code, the instructions for building, the benchmark conclusions and a picture in PNG format into a folder located under the waf folder playground/. Commit your changes, then create a patch by using git-format and submit an enhancement request to the Waf bug tracker on googlecode and post the resulting URL to this task.

While working on this task you should join and remain in #Waf on Freenode to get help, feedback, and guidance from mentors and other developers.

When you've done, post the resulting tool this task.