While performing unit tests on my templates, I noticed that they only seem to be parsed and compiled the first time that they're used, and I can confirm that a template I created but never ended up using isn't getting parsed. For most use cases, this would be fine, but I'm a bit worried about a) the performance hit you take when a template needs to be compiled and b) what might happen in a multi-threaded environment if two (or more) threads need to use the same template, but it hasn't been compiled yet.
Even if my concerns are unjustified, it would still be nice to parse and compile all my templates on startup just to make sure they all compile, instead of having to wait until it's used. How can I do this?
There are two configuration options to turn on precompile templates in Rythm:
The first one is to ask engine to precompile all templates into precompile dir, and the second one is ask the engine to load all precompiled templates from precompile dir.
Usually these configurations are used by certain plugins, e.g. play-rythm which makes rythm templates working with play 1's precompile support