chaokunyang opened a new pull request, #1551:
URL: https://github.com/apache/incubator-fury/pull/1551
## What does this PR do?
This PR fix fury input stream read slow.
## Related issues
Closes #1548
## Does this PR introduce any user-facing change?
<!--
If any user-facing interface changes, please [open an
issue](https://github.com/apache/incubator-fury/issues/new/choose) describing
the need to do so and update the document if necessary.
-->
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark
- Before this PR: cost 18031 mills
- With this PR: cost 1441mills
```java
public static void main(String[] args) throws IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ZstdOutputStream zstdOutputStream = new ZstdOutputStream(outputStream);
FURY_RELEASE.serializeJavaObject(zstdOutputStream,
BeanA.createBeanA(20));
byte[] bytes = outputStream.toByteArray();
long start = System.currentTimeMillis();
for (int i = 0; i < 10000; i++) {
zstdFuryDeserialize_Snapshot(new ByteArrayInputStream(bytes),
BeanA.class);
}
System.out.println(System.currentTimeMillis() - start);
start = System.currentTimeMillis();
for (int i = 0; i < 10000; i++) {
zstdFuryDeserialize_Snapshot(new ByteArrayInputStream(bytes),
BeanA.class);
}
System.out.println(System.currentTimeMillis() - start);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]