Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Reduced the number of String allocations for the NONE parameterList case. #1399
Please double-check me on this, but I think previously "NONE" would only be appended if the builder was empty. Rather than append to the builder and convert to a String, which will allocate a new copy of the String, I just return the String literal directly. In a sample of a production app that was up for < 15 min., I had 6,346 copies of this String.
TorqueBox slows to a crawl when I enable the YourKit agent so I couldn't leave this running in production for much longer. It probably wasn't super significant, but as you hinted, I also had no idea if it ever caps off. I took it to mean there was extra allocations on all non-JITted calls with empty params.