You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by spmallette <gi...@git.apache.org> on 2018/03/06 18:39:51 UTC
[GitHub] tinkerpop pull request #812: TINKERPOP-1911 Refactored JavaTranslator
GitHub user spmallette opened a pull request:
https://github.com/apache/tinkerpop/pull/812
TINKERPOP-1911 Refactored JavaTranslator
Cached methods that were being reflected on every translation which improved performance a bit. Here's how it runs before the change:
```text
Benchmark Mode Cnt Score Error Units
JavaTranslatorBenchmark.testTranslationLong thrpt 20 13267.284 ± 1166.704 ops/s
JavaTranslatorBenchmark.testTranslationMedium thrpt 20 334756.147 ± 23429.373 ops/s
JavaTranslatorBenchmark.testTranslationShort thrpt 20 1381906.511 ± 141710.801 ops/s
JavaTranslatorBenchmark.testTranslationWithStrategy thrpt 20 36350.729 ± 2518.351 ops/s
```
and here's how it runs after:
```text
Benchmark Mode Cnt Score Error Units
JavaTranslatorBenchmark.testTranslationLong thrpt 20 15801.483 ± 546.613 ops/s
JavaTranslatorBenchmark.testTranslationMedium thrpt 20 365673.060 ± 6101.193 ops/s
JavaTranslatorBenchmark.testTranslationShort thrpt 20 1560609.216 ± 37680.931 ops/s
JavaTranslatorBenchmark.testTranslationWithStrategy thrpt 20 39533.823 ± 1317.264 ops/s
```
Not a huge difference but seemed to be worth doing.
All tests pass with `mvn clean install && mvn verify -pl gremlin-server -DskipIntegrationTests=false`
VOTE +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1911
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/812.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 #812
----
commit d9db27f4aa7b8227a557cf5bbb31203612d7548f
Author: Stephen Mallette <sp...@...>
Date: 2018-03-06T18:00:30Z
TINKERPOP-1911 Refactored JavaTranslator
Cached methods that were being reflected on every translation which improved performance a bit.
----
---
[GitHub] tinkerpop issue #812: TINKERPOP-1911 Refactored JavaTranslator
Posted by jorgebay <gi...@git.apache.org>.
Github user jorgebay commented on the issue:
https://github.com/apache/tinkerpop/pull/812
lgtm, VOTE +1
---
[GitHub] tinkerpop pull request #812: TINKERPOP-1911 Refactored JavaTranslator
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/tinkerpop/pull/812
---
[GitHub] tinkerpop issue #812: TINKERPOP-1911 Refactored JavaTranslator
Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/812
The local cache is specific to the `GraphTraversalSource` that's passed into the `of()` construction method. As the `GraphTraversalSource` is specific to the instance and is not known until construction I figured it was better if it were managed local to the `JavaTranslator` instance
---
[GitHub] tinkerpop issue #812: TINKERPOP-1911 Refactored JavaTranslator
Posted by robertdale <gi...@git.apache.org>.
Github user robertdale commented on the issue:
https://github.com/apache/tinkerpop/pull/812
What's the difference between the global method cache and the local method cache?
---
[GitHub] tinkerpop issue #812: TINKERPOP-1911 Refactored JavaTranslator
Posted by BrynCooke <gi...@git.apache.org>.
Github user BrynCooke commented on the issue:
https://github.com/apache/tinkerpop/pull/812
+1 (Non binding)
---