[
https://issues.apache.org/jira/browse/TINKERPOP-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277951#comment-15277951
]
ASF GitHub Bot commented on TINKERPOP-1295:
-------------------------------------------
Github user spmallette commented on the pull request:
https://github.com/apache/incubator-tinkerpop/pull/307#issuecomment-218128585
This is an interesting change. I was surprised to see that much difference
between `compile()` and `eval()`. `eval()` ultimately calls compile but does
cache the compile script for future use. I would have thought that would have
narrowed the gap you managed to get between the two calls. There's a fair bit
of code in `eval()` that gets executed with or without the cache as compared to
`compile` so perhaps that has something to do with it. As the execution here
is about usage of the same script over and over there is little need for
`eval()` so this change makes sense to me.
I will only note that this forces the `ScriptEngine` we use to for
`ScriptRecordReader` to implement `Compileable`. Not all implementations do
that and it is not a required interface to the best of my recollection. That
probably doesn't matter too much as we've currently hardcoded the groovy script
engine in here.
Ran `mvn clean install` to success.
VOTE +1
> Precompile ScriptInputFormat scripts once during initialization of
> ScriptRecordReader
> -------------------------------------------------------------------------------------
>
> Key: TINKERPOP-1295
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1295
> Project: TinkerPop
> Issue Type: Improvement
> Components: hadoop, io
> Affects Versions: 3.2.0-incubating, 3.1.2-incubating
> Reporter: Ted Wilmes
> Assignee: Ted Wilmes
> Attachments: intern.svg
>
>
> The {{ScriptRecordReader}} evals scripts on every {{nextKeyValue()}}. I
> think we can cut down on script execution evaluation time by precompiling the
> input script once. This should speedup bulk loads. I've attached some
> profiling info showing a large chunk of time being spent on this eval during
> a recent test run.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)