Gosu template best practices
The Gosu compiler converts a Gosu template file into generated Java class files. The Java compiler has a maximum size of 65535 bytes for any class method. Sufficiently large Gosu templates can result in templates that fail at run time due to this JVM limitation.
If you have very large templates, break them into nested templates. For example, suppose you have a large template that generates three different sections of a large page. Create three additional templates that generate one part of the content. The original template could contain code that calls the other three templates. This design practice prevents bumping up against the size limit. Additionally, this style produces more readable and more manageable code.
See also
