You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/05/27 01:48:04 UTC

[jira] [Commented] (TINKERPOP-1680) Add string performance options to StarGraph

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

ASF GitHub Bot commented on TINKERPOP-1680:
-------------------------------------------

GitHub user dalaro opened a pull request:

    https://github.com/apache/tinkerpop/pull/616

    TINKERPOP-1680 Add string performance options to StarGraph

    By default, StarGraph invokes intern() on vertex label and property
    key strings.  It also toString()s vertex and edge IDs for comparisons
    and existence checks.
    
    This commit introduces a new StarGraph builder with a pair of boolean
    options controlling these behaviors.

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

    $ git pull https://github.com/dalaro/incubator-tinkerpop TINKERPOP-1680

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

    https://github.com/apache/tinkerpop/pull/616.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 #616
    
----
commit 0155665162668f68713bc4fe5a95678a6905c72b
Author: Dan LaRocque <da...@hopcount.org>
Date:   2017-04-04T23:41:29Z

    TINKERPOP-1680 Add string performance options to StarGraph
    
    By default, StarGraph invokes intern() on vertex label and property
    key strings.  It also toString()s vertex and edge IDs for comparisons
    and existence checks.
    
    This commit introduces a new StarGraph builder with a pair of boolean
    options controlling these behaviors.

----


> Add string performance options to StarGraph
> -------------------------------------------
>
>                 Key: TINKERPOP-1680
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1680
>             Project: TinkerPop
>          Issue Type: New Feature
>          Components: structure
>            Reporter: Dan LaRocque
>            Priority: Minor
>
> I suggest adding a backwards-compatible StarGraph builder exposing a couple minor performance-sensitive behaviors for configuration.
> Specifically:
> * StarGraph calls {{String#intern}} on labels
> * StarGraph calls {{toString}} on ID elements when testing element-existence-by-id
> It would be nice to have the option to disable these calls in use-cases that don't need them.  The performance gain is going to be small and bound to a narrow set of applications, but it's nice to have the choice.  It shaved about 3~5% runtime off the use case-case that led me here (via profiling).
> I already tested a local change that adds a builder while neither modifying StarGraph's default behavior nor disturbing any of its existing method/constructor signatures.  I'll file a PR against tp32 momentarily.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)