I need to populate ~20k built-in function and constants from an CHM file into a List. First I tried to serialize a list of them, but deserialization takes 1500ms (too long for a quick code-completion, even at the first hit).
Tried code generation using StringTemplate, which generates valid code. But it won't compile because "initEnums() method exceeded size limit of 65536". (And my Eclipse dies soon after)
The generated method looks like this:
public XModelField[] initEnums() {
return new XModelField[] {
new XModelField("aName", "aType", ...),
...
// About 4'000 more entries
};
}
If this limit is constrained only to source code, I could use another library to generate the class file directly (maybe CodeModel). I'd like to keep my code, if possible without rewriting the output generator from scratch again. Any suggestions?