-
Notifications
You must be signed in to change notification settings - Fork 334
Benchmark and speed dual JVM mode up #13780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
static byte[] writeObject(PerMap map, Object obj, Function<Object, Object> writeReplace) | ||
throws IOException { | ||
var histogram = PerUtils.LOG.isLoggable(System.Logger.Level.DEBUG) ? new Histogram() : null; | ||
var histogram = PerUtils.LOG.isLoggable(System.Logger.Level.TRACE) ? new Histogram() : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- this change suppresses histogram (of transfered bytes) printing in the "dual JVM"
- by printing less, the message exchange shall get faster: benchmark run
- the big question for @hubertp: How to configure logging in the "dual JVM"?
Time to reduce the histogram of sent messages... |
* runEngineDistribution | ||
* --vm.D=org.enso.jvm.interop.limit=100000 | ||
* --vm.D=polyglot.enso.classLoading=guest | ||
* --run test/Generic_JDBC_Tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since f0ded99 use:
runEngineDistribution
--vm.D=org.enso.jvm.interop.limit=100000
--vm.D=polyglot.enso.classLoading=guest
--run test/Generic_JDBC_Tests
to dump the top 10 of most frequent messages being sent.
yield new OtherJvmObject(null, id); | ||
var other = new OtherJvmObject(null, id); | ||
other.isMetaObject = iop.isMetaObject(foreign); | ||
other.isNull = iop.isNull(foreign); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefilling isMetaObject
and isNull
before leaving the other JVM should speed things up: benchmark run scheduled to verify the hypothesis.
data.bench_tests 1 [ "--vm.D=polyglot.enso.classLoading=guest", single_test_filter ] | ||
group_builder.specify "Single_Dual_JVM_Tests" <| | ||
data.bench_tests 1 jvm=True [ "--vm.D=polyglot.enso.classLoading=guest", single_test_filter ] | ||
group_builder.specify "Real_JVM_Tests" <| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the "real" test that occupies most of the Generic_JDBC_Tests
execution. It used to be quite slow. Now it is just six times slower than the one in --jvm
mode. Time to generate the initial benchmark data.
…ave parent meta objects
} | ||
case TruffleObject foreign -> { | ||
var iop = InteropLibrary.getUncached(); | ||
if (iop.isString(foreign)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Transferring strings directly shall allow us to eliminate isString
messages in fc4ff25 - benchmark run to confirm.
private Boolean isNull; | ||
private Boolean hasArrayElements; | ||
private final short mask; | ||
private String metaQualifiedName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
|
Pull Request Description
--jvm
modetest/Generic_JDBC_Tests
projectOtherJvmObject
and caching computed queriesChecklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.