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

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

GitHub user SteamShon opened a pull request:

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

    [S2GRAPH-16] Performance tunning on where parser

    Add InWithoutParent on Where parser for performance tunning.

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

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

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

    https://github.com/apache/incubator-s2graph/pull/6.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 #6
    
----
commit fe9c7ee39d8cc32a50c9cd1880dbba37c7cd311b
Author: SteamShon <[email protected]>
Date:   2016-01-06T08:47:57Z

    S2GRAPH-16: Add InWithoutParent on Where parser for performance tunning.

----


> Performance tunning on where parser
> -----------------------------------
>
>                 Key: S2GRAPH-16
>                 URL: https://issues.apache.org/jira/browse/S2GRAPH-16
>             Project: S2Graph
>          Issue Type: Improvement
>            Reporter: DOYUNG YOON
>            Assignee: DOYUNG YOON
>              Labels: performance
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Current implementation has critical performance problem on IN parser. 
> ex) where: age in(1, 2, 3, 4, 5 ...)  / where: _parent.age in (1, 2, 3, 4, 5, 
> …)
> when the query has M edges as result with N elements in IN clause, then IN 
> case class that create N innerVal set and check if this edge`s property value 
> is in this N innerVal set. The most problematic part is building N innerVal 
> set from user query is executed M times(number of result edges, usually 
> hundreds to thousands). 
> This create lots of object which create lots of GC and waste lots of cpu 
> resources.
> We can improve this by reducing number of calls to build values to compare on 
> IN.
> building InnerVal set(from above example, it is build 1,2,3,4,5) for value to 
> compare only need to be perform once per each query and never be dependent to 
> number of result edges. only checking against built InnerVal set should be 
> dependent to number of result edges.



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

Reply via email to