Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.11.1
Description
Currently every time you invoke JsonProperties.getObjectProps on same instance, the code loops over the props and creates a new LinkedHashMap and a new UnmodifiableMap.
In our use case, we store a Protocol (and the JsonProperties) and access the same instances multiple times.
Storing a simple cache "private Map<String, Object> objectProps;" inside JsonProperties will slightly improve performance and memory usage.
objectProps can be lazy initialized in JsonProperties.getObjectProps and reset when "JsonProperties.addProp(String, JsonNode)" is invoked.
Thanks.
Attachments
Issue Links
- links to