Did you know that Nicolas has taken up a weekly stream about Haxe? Of course you did! You are following all things #Haxe on twitter after all. The stream will take place weekly on Friday at 13:30 CET (Paris time) over at Nicolas' Youtube Channel.
The avid follower will also point out that last week's episode was actually episode two and not episode one. Unfortunately, however, the first episode was not recorded due to some technical issues and thus we decided to start over. So here it is:
Episode 1 - The Compilation Server
Before diving into the topic of the week, Nicolas quickly commented on the launch of the Haxe Blog and the release of HaxeDevelop. He also showed off the blog's other two articles, a reposting of his update on the Haxe Foundation and a case study about TiVo that I wrote last year. Head on over and check them out.
How to use the Compilation Server
First off, Nicolas explained how to accurately measure compilation time using
--times. He further commented that the Haxe compiler already has excellent compilation time and that you may not always find it necessary to improve on it further. However, even our speedy Haxe compiler can rack up some serious time compiling larger projects which is where some speed upgrades come in handy.
He then walked us through starting the compilation server from the console and connecting to it. When connecting to the server, the compilation is run on the compilation server instead of locally. After running the first compilation, the server actually caches the information on already compiled files, classes, macros and methods. On the second compile, the server will re-use as much of the already compiled information as possible. It will only have to recompile those parts that are dependent on the things that changed. This will significantly reduce the compilation time of your project. In Nicolas' example, the compilation time was reduced by 90%.
The compilation server will cache the information based on your compilation parameters. If you change one of the parameters, you will have another "first compile". However, after the compilation is run, the server will cache the data. It will also keep the data of compilations run with other settings.
After showing what the compilation server can do for your compilation time, Nicolas went on to demonstrate how it could also significantly improve the completion time in HaxeDevelop. Using only the compiler for completion can be pretty slow. If you change your settings and have the compilation server do the completion for you, you get almost instant completion.
The Haxe 3.3 release will contain a new fix of the compilation server for HaxeDevelop and FlashDevelop, so please go and check it out and report any issues on the Haxe GitHub repository.
Next Week's Episode - Heaps
In next week's episode, Nicolas will introduce his Game Framework Heaps. Don't forget to tune in next Friday at 13:00 CET at Nicolas' Youtube Channel.
Heaps is a high performance cross platform graphics engine which was used for for both Until Dark and Evoland 2.