ASF GitHub Bot commented on S2GRAPH-232:

GitHub user daewon opened a pull request:


    [S2GRAPH-232] Elimination of inefficiency due to duplication in GraphQL 
schema generation.

    When I created an issue, I expected that there would be a load on duplicate 
ObjectType generation.
    However, the profiling result was actually a lot of DB round trips in the 
bottleneck area.
    For example, to create an ObjectType for a Label, the LabelMeta and 
LabelIndex value included in the label must be brought up.
    Since all the data needed to generate the schema is needed only once, the 
entire data is read in advance and the data is generated.
    Since the DB data is all metadata, the size is small, so it does not burden 
the memory.
    It can also help manage the cache's validity cycle by reading the data all 
at once.

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

    $ git pull https://github.com/daewon/incubator-s2graph S2GRAPH-232

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


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

    This closes #181
commit 8ff8c233e8a4f1194702c649bff3f5a99cb8273d
Author: daewon <daewon@...>
Date:   2018-07-10T05:20:37Z

    add toValidName

commit 597b853559ea5b6e79b2ddfd400757bc42654233
Author: daewon <daewon@...>
Date:   2018-07-10T06:37:40Z

    remove inefficiency logic

commit c8d30051d193d88fa4f6f076836b29fba488b465
Author: daewon <daewon@...>
Date:   2018-07-10T09:30:34Z

    add distinct

commit 014768af4f783ff30cf73e4ac7f06d636dc36f66
Author: daewon <daewon@...>
Date:   2018-07-11T10:24:33Z

    increase schema create speed


> Elimination of inefficiency due to duplication in GraphQL schema generation.
> ----------------------------------------------------------------------------
>                 Key: S2GRAPH-232
>                 URL: https://issues.apache.org/jira/browse/S2GRAPH-232
>             Project: S2Graph
>          Issue Type: Improvement
>          Components: s2graphql
>            Reporter: Daewon Jeong
>            Assignee: Daewon Jeong
>            Priority: Minor
> Elimination of inefficiency due to duplication in GraphQL Schema generation.
> Generates Schema for GraphQL based on S2Graph Model information when 
> executing GraphQL server.
> Now,
> 1. Based on each Service
> 2. Create a Object type for the associated ServiceColumn
> 3. Find the Label that holds the ServiceColumn as the Source and create the 
> Label Object type.
> 4. The Label object Type is generated from the Source ServiceColumn, and 
> because it has the Target ServiceColumn, it returns to the second operation 
> based on that ServiceColumn.
> In the above four steps, the tasks 2 to 4 may overlap.
> Therefore, Graphql Schema generation is slowed down by unnecessary Schema 
> generation.
> Eliminate unnecessary duplication to lighten the schema.

This message was sent by Atlassian JIRA

Reply via email to