-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b19
getEntryPos does this:
/* Add slash and try once more */
name = Arrays.copyOf(name, name.length + 1);
name[name.length - 1] = '/';
hsh = hash_append(hsh, (byte)'/');
A trivial optimization to ZipFile.getEntryPos would be to only copy the name array after finding a match for the re-calculated hash value. This removes an allocation and array copy on every miss.
/* Add slash and try once more */
name = Arrays.copyOf(name, name.length + 1);
name[name.length - 1] = '/';
hsh = hash_append(hsh, (byte)'/');
A trivial optimization to ZipFile.getEntryPos would be to only copy the name array after finding a match for the re-calculated hash value. This removes an allocation and array copy on every miss.
- relates to
-
JDK-8145260 To bring j.u.z.ZipFile's native implementation to Java to remove the expensive jni cost and mmap crash risk [2]
-
- Resolved
-