[ 
https://issues.apache.org/jira/browse/FLINK-8227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16294174#comment-16294174
 ] 

ASF GitHub Bot commented on FLINK-8227:
---------------------------------------

Github user dawidwys commented on the issue:

    https://github.com/apache/flink/pull/5142
  
    I think it is a very good and needed change.
    
    As for @StephanEwen questions:
    
    Ad 1. I see no problem with this `entryId` being primitive `int`. 
    Ad 2. I think this field should be transient it is used only during the 
serialization process to reflect the order in which we serialize the 
SharedBufferEntries to restore the links between them. It does not play any 
role outside of serialization.
    Ad 3. I agree it should be at least long. It will limit  the number of 
intermittent state of pattern graph.
    
    After changing `int` to `long` I think it is ok to be merged.


> 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)

Reply via email to