Maximum file-based template size
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 separate sections of a large page. Create three additional templates that each generate one part of the content. The original template could contain code that calls the other three templates. This design practice prevents breaching the size limit. Additionally, this style produces more readable and more manageable code.
