GitHub user twilmes opened a pull request:
https://github.com/apache/incubator-tinkerpop/pull/144
TINKERPOP3-957: Improve speed of addV()
https://issues.apache.org/jira/browse/TINKERPOP3-957
I profiled the basic addV traversal and made a number of spot optimizations
based upon the top 5 or so bottlenecks. These included:
* Converting a number of stream calls into basic for loops
* Cutting down on the allocation of new unmodifiable step collections by
wrapping the steps once on init
* Avoiding object allocation through the use of Collections.arrayContains
I did not end up making any changes to the addV or addE steps themselves
because the majority of the run time is not coming from the execution of those
steps themselves.
Performance results on my box of running 100,000 addVs
Before: 341 ms
After: 224 ms
Ran mvn clean install without issue. I did not add or update any tests
because the spots that were updated already had coverage.
I just learned the hard way that I cannot rewrite git history in the apache
repo so there are 2 extra commits associated with this due to a rebase and an
inability to force a push.
VOTE +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP3-957
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-tinkerpop/pull/144.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 #144
----
commit 94a54b6099e019d79c3a3eb85264387bd5578235
Author: Ted Wilmes <[email protected]>
Date: 2015-11-16T14:39:46Z
TINKERPOP3-957 Made a number of changes to improve traversal startup and
execution performance.
commit 42e771d7073161208f1908ab7c0f9303a8effa53
Author: Ted Wilmes <[email protected]>
Date: 2015-11-16T14:39:46Z
TINKERPOP3-957 Made a number of changes to improve traversal startup and
execution performance.
commit e5764dfb4ba733ecd662123e4e61b47e79a19a09
Author: Ted Wilmes <[email protected]>
Date: 2015-11-16T15:22:25Z
Merge branch 'TINKERPOP3-957' of
https://git-wip-us.apache.org/repos/asf/incubator-tinkerpop into TINKERPOP3-957
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---