[
https://issues.apache.org/jira/browse/FLINK-8227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16299640#comment-16299640
]
ASF GitHub Bot commented on FLINK-8227:
---------------------------------------
Github user dianfu commented on the issue:
https://github.com/apache/flink/pull/5142
@dawidwys @StephanEwen Sorry for late response. For question 1 and 2, I
have the same thought with @dawidwys and have updated the PR accordingly. For
question 3, I think `int` is enough as we currently store `SharedBufferEntry`
in a `HashMap` for each `SharedBufferPage`, and the size of `HashMap` is
`int`. If we want to support `long`, we should also change `HashMap` to
something else. What's your thought?
> Optimize the performance of SharedBufferSerializer
> --------------------------------------------------
>
> Key: FLINK-8227
> URL: https://issues.apache.org/jira/browse/FLINK-8227
> Project: Flink
> Issue Type: Bug
> Components: CEP
> Reporter: Dian Fu
> Assignee: Dian Fu
>
> Currently {{SharedBufferSerializer.serialize()}} will create a HashMap and
> put all the {{SharedBufferEntry}} into it. Usually this is not a problem. But
> we obverse that in some cases the calculation of hashCode may become the
> bottleneck. The performance will decrease as the number of
> {{SharedBufferEdge}} increases. For looping pattern {{A*}}, if the number of
> {{SharedBufferEntry}} is {{N}}, the number of {{SharedBufferEdge}} is about
> {{N * N}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)