mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Park (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-6972) Improve performance of protobuf message passing by removing RepeatedPtrField to vector conversion.
Date Tue, 05 Dec 2017 19:18:00 GMT

    [ https://issues.apache.org/jira/browse/MESOS-6972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279069#comment-16279069
] 

Michael Park commented on MESOS-6972:
-------------------------------------

{noformat}
commit 62b4727310873e80c82516971150082924d9075a
Author: Dmitry Zhuk <dzhuk@twopensource.com>
Date:   Tue Dec 5 11:04:00 2017 -0800

    Reduced # of supported arguments in `_Deferred` conversion operators.

    Conversion of `_Deferred` to `std::function` and `Deferred` currently
    supports up to 12 parameters in function signature. However, this is
    unnecessary and is a huge overhead. Most usages require just one
    parameter (e.g. when `defer` is used with `Future`). And there are few
    usages with two parameters (in `master.cpp` to initialize allocator, and
    in `slave.cpp` to install signal handler). This number of parameters is
    different from the number of parameters passed to `defer`, but it's
    related and can be defined as maximum number of placeholders that can be
    passed to `defer`.

    Given that `deferred.hpp` is indirectly included in most source files,
    it is beneficial to keep this number low. This patch changes maximum
    number of parameters to 2.

    Review: https://reviews.apache.org/r/64338/
{noformat}
{noformat}
commit 13eda27802cfe05800d4dcbed22c46ca7b46bafb
Author: Dmitry Zhuk <dzhuk@twopensource.com>
Date:   Tue Dec 5 10:40:37 2017 -0800

    Prepared `defer` for use in callable-once contexts.

    This changes `defer` to use `lambda::partial` instead of `std::bind`,
    which allows it be used in callable-once contexts.

    Review: https://reviews.apache.org/r/63635/
{noformat}
{noformat}
commit 0d9ce98e9df97be06144d2e29cf23a9c090a06b3
Author: Dmitry Zhuk <dzhuk@twopensource.com>
Date:   Tue Dec 5 10:39:47 2017 -0800

    Changed dispatch to use callable once functors.

    `dispatch` guarantees that functor will be called at most once, and
    therefore it allows optimizations, such as moves of deferred objects.

    Review: https://reviews.apache.org/r/63634/
{noformat}

> Improve performance of protobuf message passing by removing RepeatedPtrField to vector
conversion.
> --------------------------------------------------------------------------------------------------
>
>                 Key: MESOS-6972
>                 URL: https://issues.apache.org/jira/browse/MESOS-6972
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Benjamin Mahler
>              Labels: performance, tech-debt
>
> Currently, all protobuf message handlers must take a {{vector}} for repeated fields,
rather than a {{RepeatedPtrField}}.
> This requires that a copy be performed of the repeated field's entries (see [here|https://github.com/apache/mesos/blob/9228ebc239dac42825390bebc72053dbf3ae7b09/3rdparty/libprocess/include/process/protobuf.hpp#L78-L87]),
which can be very expensive in some cases. We should avoid requiring this expense on the callers.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message