Skip to content
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

Reduce object allocation with MessageSerializer. #293

Merged
merged 6 commits into from
Apr 3, 2018

Conversation

johnou
Copy link

@johnou johnou commented Apr 3, 2018

No pooling

Benchmark                                         Mode  Cnt       Score      Error  Units
SingleNodeBenchmark.requestThroughput            thrpt   40  163676.503 ± 1647.612  ops/s
SingleNodeBenchmark.avgRequestTime_batched        avgt   40       3.958 ±    0.086  us/op
SingleNodeBenchmark.avgRequestTime_singleThread   avgt   40      20.065 ±    0.745  us/op

Pooling

Benchmark                                         Mode  Cnt       Score      Error  Units
SingleNodeBenchmark.requestThroughput            thrpt   40  170217.244 ± 1900.282  ops/s
SingleNodeBenchmark.avgRequestTime_batched        avgt   40       3.808 ±    0.053  us/op
SingleNodeBenchmark.avgRequestTime_singleThread   avgt   40      19.840 ±    1.029  us/op

Fixes #292

@johnou johnou changed the title WIP: Reduce object allocation with MessageSerializer. Reduce object allocation with MessageSerializer. Apr 3, 2018
return null;
}
});
return out.toBytes();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no risk of data corruption here, new byte array is returned, not the pooled byte array.

@JoeHegarty JoeHegarty merged commit 55a4a5d into orbit:master Apr 3, 2018
@johnou johnou deleted the improved_serialization branch April 3, 2018 21:37
ceckhardt pushed a commit to ceckhardt/orbit that referenced this pull request Apr 18, 2018
* upstream/master: (32 commits)
  Mainline to 1.9.3-SNAPSHOT
  Version 1.9.2
  Fix invalid use of await in Hosting.shouldPlaceLocally() (orbit#297)
  Mainline to 1.9.2-SNAPSHOT
  Version 1.9.1
  Guard against output buffer overflow. (orbit#296)
  Mainline to 1.9.1-SNAPSHOT
  Version 1.9.0
  Add node placement group support (orbit#295)
  Guard against input buffer underflow. (orbit#294)
  Update orbit-parent to 2
  Reduce object allocation with MessageSerializer. (orbit#293)
  JDK9+ Support
  Update README.md
  Avoid creating Task every time done() is invoked. (orbit#291)
  Mainline to 1.8.1-SNAPSHOT
  Version 1.8.0
  JVM Shutdown Hook (orbit#290)
  Optimise object allocation when using allOf with Streams. (orbit#289)
  fast-classpath-scanner 2.9.4. (orbit#288)
  ...

# Conflicts:
#	actors/core/pom.xml
#	actors/infinispan-cluster/pom.xml
#	actors/json/pom.xml
#	actors/pom.xml
#	actors/runtime/pom.xml
#	actors/runtime/src/main/java/cloud/orbit/actors/Stage.java
#	actors/runtime/src/main/java/cloud/orbit/actors/runtime/KryoSerializer.java
#	actors/test/actor-tests/pom.xml
#	actors/test/benchmarks/pom.xml
#	commons/pom.xml
#	commons/src/main/java/cloud/orbit/concurrent/Task.java
#	pom.xml
@JoeHegarty JoeHegarty added this to the 1.9.0 milestone May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants