Memory enhancements as described in GROOVY-6171