You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "mibo (JIRA)" <ji...@apache.org> on 2019/05/14 19:12:00 UTC
[jira] [Resolved] (OLINGO-1357) Construction of EdmTypeKind very
expensive
[ https://issues.apache.org/jira/browse/OLINGO-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
mibo resolved OLINGO-1357.
--------------------------
Resolution: Fixed
Fixed with GitHub https://github.com/apache/olingo-odata4/pull/51
> Construction of EdmTypeKind very expensive
> ------------------------------------------
>
> Key: OLINGO-1357
> URL: https://issues.apache.org/jira/browse/OLINGO-1357
> Project: Olingo
> Issue Type: Bug
> Components: odata4-commons
> Affects Versions: (Java) V4 4.6.0
> Reporter: Dirk Mahler
> Assignee: mibo
> Priority: Major
> Fix For: (Java) V4 4.7.0
>
> Attachments: EdmTypeKind.PNG
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> From the attached screenshot of the VisualVM sampler can be seen that construction of EdmTypeInfo instances is very expensive as EdmPrimitiveTypeKind.valueOf is used:
> {code:java}
> try {
> primitiveType = EdmPrimitiveTypeKind.valueOf(typeName);
> } catch (final IllegalArgumentException e) {
> primitiveType = null;
> }
> {code}
> The problem here is the exception that is thrown if the value cannot be found. Suggesting to use a static Map to cache values, PR will be provided.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)