Switched to using the StreamingMarkupBuilder which gives some insulation against really big groovy files. But still not for massive files (eg >10'000 lines)