Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Many places especially in the security code use String arrays as an intermediate representation for multivalued name and string properties. Unfortunately this practice leads to quite a bit of extra memory allocation and extra work in performance-critical places like AC evaluation.
For example, a significant percentage of the time in the SetProperty benchmark goes to PrivilegeUtil.readDefinitions(), just because of the array conversion that requires a number of extra object allocations and at least two extra iterations over the relevant value strings.
That extra work could be avoided in readDefinitions() and other similar places if the Iterable<String> return type of PropertyState.getValues() was used directly instead of a String array.