You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Ron Passerini (Jira)" <ji...@apache.org> on 2024/06/04 19:26:00 UTC
[jira] [Updated] (OLINGO-1625) The serializers have performance issues when Entities contain very large numbers of Properties
[ https://issues.apache.org/jira/browse/OLINGO-1625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ron Passerini updated OLINGO-1625:
----------------------------------
Attachment: 0001-OLINGO-1625-Fix-performance-problem-in-serializers-f.patch
> The serializers have performance issues when Entities contain very large numbers of Properties
> ----------------------------------------------------------------------------------------------
>
> Key: OLINGO-1625
> URL: https://issues.apache.org/jira/browse/OLINGO-1625
> Project: Olingo
> Issue Type: Bug
> Components: odata4-server
> Affects Versions: Version (Java) V4 5.0.0
> Reporter: Ron Passerini
> Priority: Major
> Labels: json, performance, serialization, xml
> Fix For: (Java) V4 5.0.1
>
> Attachments: 0001-OLINGO-1625-Fix-performance-problem-in-serializers-f.patch
>
>
> I've implemented an OData service that serves up some large datasets in a streaming fashion. Some of those datasets have large numbers of fields (over 1,000). When I requested one of them which was around 350M in size, it took way longer than expected.
> I profiled the request in IntelliJ's profiler and found that over 75% of the CPU cycles were spent in String.equals() comparing column names in the serializers. This is because there is an O(N^2) issue that for every column selected (in my case all of them) it will iterate across the entire list of entity properties looking for the one with the same name.
> I have already implemented a fix whereby before doing the property serialization, the serializer builds a hash map of property-name-to-property, making the resulting algorithm O(N) with the number of properties being serialized.
> After profiling the change, again in IntelliJ's profiler, the String.equals() which was over 75% before, is now under 1%.
> I will be creating a patch and attaching it momentarily.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)