Conversation
… Bytecode->JavaTranslator translation. From 0.098ms to 0.029ms. If a GremlinServer Bytecode cache is not desired, then, at minimum we should use this JavaTranslator update in its place.
…aversal and TraversalSource methods. Cleaner code with less instanceof stuff.
Contributor
|
I'm thinking that the cache hit count would be pretty low given the fact that bytecode contains parameters. since the hit count will be low, we'll just have the overhead of a cache without much value. it would be sweet if we could decouple the traversal from parameters so that a cache would be more effective, but i don't know what's involved with that offhand. |
Contributor
|
VOTE +1 |
Contributor
|
All good, here's the missing VOTE: +1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/TINKERPOP-1444
GremlinServer caching
Map<Bytecode,Traversal>is only powerful (really powerful) when bindings are not involved (a solid 50x+ increase in speed). However, given that production systems will typically have bindings in their traversals, then such a cache doesn't help.In its place, a update to
JavaTranslatoris provided that makes use of an internal staticMETHOD_CACHEso as to make reflection faster. The speed up is provided below:CHANGELOG
@spmallette --- if you think that a
Map<Bytecode,Traversal>cache IS necessary for GremlinServer, then please VOTE -1 and we can collaborate on this branch to also include a bytecode-cache.