GitHub user zhiyu-he opened a pull request:
https://github.com/apache/thrift/pull/1440
Enhancement binary_protocol with frametransport
for frametransport
write method write data-length to server
read method read data-length from server
and there are lots of un-usable memory copy & system call
i optimize this with an simple buffer, manager de write & read
with the benchmark for write improve 2times & for read improve 3times
link-for testingï¼
https://github.com/zhiyu-he/go_performance/blob/hzy/modify/benchmark/thrift_serializer_test.go
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ThoseFlowers/thrift OPT/fast_binary_protocol
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/1440.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1440
----
commit 872f7450d352209e1ee2644ec9a43c74af88137d
Author: hezhiyu <[email protected]>
Date: 2017-12-08T09:37:32Z
q
Change-Id: Iba77f4f202575c5c12cd3a490481593b58a35b94
----
---