When a Java StringBuilder is used to build a string, string addition is done each time. This is inefficient (O(n**2) efficiency), and a list of strings can be used and then ''.join(list) done to assemble the string.
This should be done for IDL as well.