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

ASF GitHub Bot commented on S2GRAPH-66:
---------------------------------------

GitHub user SteamShon opened a pull request:

    https://github.com/apache/incubator-s2graph/pull/50

    [S2GRAPH-66]: Optimize toEdge, IndexEdgeDeserializable using mutable Map.

    use immutable.Map.newBuilder to build merged props.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SteamShon/incubator-s2graph S2GRAPH-66

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-s2graph/pull/50.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #50
    
----
commit 360daba9da38659cc1e1fb9b75ee667265b8700c
Author: DO YUNG YOON <[email protected]>
Date:   2016-03-28T13:10:42Z

    [S2GRAPH-66]: Optimize toEdge, IndexEdgeDeserializable using mutable Map.
    
    use immutable.Map.newBuilder to build merged props.

----


> Optimize toEdge, IndexEdgeDeserializable using mutable Map.
> -----------------------------------------------------------
>
>                 Key: S2GRAPH-66
>                 URL: https://issues.apache.org/jira/browse/S2GRAPH-66
>             Project: S2Graph
>          Issue Type: Improvement
>            Reporter: DOYUNG YOON
>            Assignee: DOYUNG YOON
>              Labels: serde, write
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> since {{Storage#toEdge}} is called lots of times(# of edges query traverse), 
> I think it is worth to optimize futher.
> based on profile, we can notice that List#toMap and List#++ on two list takes 
> many cpu time on toEdge(actually {{IndexEdgeDeserializable#fromKeyValues}}).
> we can avoid List#toMap and List#++ by using MapBuilder and give up 
> functional style here. 
> I think code looks ugly(maybe not), but we can remove unnecessary cpu usage. 
> !https://cloud.githubusercontent.com/assets/1264825/14624064/2659ab3e-0612-11e6-9c94-37d866bcda93.jpg!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to