linkedin / rest.li

Rest.li is a REST+JSON framework for building robust, scalable service architectures using dynamic discovery and simple asynchronous APIs.
rest.li
Other
2.51k stars 546 forks source link

resolvedProperties in schemas are barely populated & consuming memory because of the default HashMap constructor #879

Open idarmans opened 1 year ago

idarmans commented 1 year ago

DataSchema._resolvedProperties & RecordDataSchema$Field._resolvedProperties have been reported in our use cases within LinkedIn as consuming too much memory due to the unnecessarily-large HashMaps. If most use cases also don't use resolvedProperties that much, we should be able to initialize them to 0 to start with, and let them resize based on usage