GitHub user romange opened a pull request:

    https://github.com/apache/thrift/pull/122

    0.9.x

    Eliminate redundant allocations for temporary args during RPC processing. 
    The change is suitable for ThreadPoolServer where each thread processed its 
own connection.
    
    We create thread local request/response arguments instead of allocating 
them on stack in TDispatchProcessor. This way, the next  RPC reuses already 
allocated strings and arrays.
    In order to make sure that the objects are semantically empty we added a 
new method "clear" that resets all its fields to their initial values (0 for 
basic types, empty for containers) and unsets optional fields.
    
    On our system the CPU usage during high QPS period was cut by 50%.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/romange/thrift 0.9.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/122.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 #122
    
----
commit b80d850e692f01e1fa23ec0a7e9002524c536691
Author: Roman Gershman <[email protected]>
Date:   2014-05-14T15:39:00Z

    add clear method to cpp thrift messages

commit 270bbd4ce37ea1c922d852a7309edf668318e7b4
Author: Roman Gershman <[email protected]>
Date:   2014-05-15T00:37:04Z

    fix macro error

commit b4883f4018a1f697318f8608c1790c648466be28
Author: Roman Gershman <[email protected]>
Date:   2014-05-15T00:53:49Z

    fix include path problems

commit 04dbab5e382df9cd55dd8d06dc5a26261f1decf6
Author: Roman Gershman <[email protected]>
Date:   2014-05-15T01:40:22Z

    add support for thread local variables

commit 7054bb9d2b058a1306236e21723cd035a0433bdb
Author: Roman Gershman <[email protected]>
Date:   2014-05-15T09:29:43Z

    remove allocations by using thread-local data structures or reuse the same 
variables during repetitive operations

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to