Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.5.0-beta4
-
None
Description
The AllJsIframeVersioner causes a massive memory allocation executing the following:
StringBuilder jsBuf = new StringBuilder();
for (FeatureResource resource : registry.getAllFeatures().getResources())
this.allJsChecksum = HashUtil.checksum(jsBuf.toString().getBytes());
The two problems with this are:
(1) Creates a massive char[] for that string (we tested with a 4M resource)
(2) Then allocates a new byte[] for that giant string
Proposed solution is to just use a simple message digest object against each resource content. And concat all the bytes for HashUtil.checksum.