You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benjamin Mahler (JIRA)" <ji...@apache.org> on 2018/08/07 03:11:00 UTC
[jira] [Commented] (MESOS-9110) Add move support to the Resources /
Resource_ wrappers.
[ https://issues.apache.org/jira/browse/MESOS-9110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571073#comment-16571073 ]
Benjamin Mahler commented on MESOS-9110:
----------------------------------------
{noformat}
commit 5cde1e24e655d107d92fde2eda487883972c2466
Author: Meng Zhu <mz...@mesosphere.io>
Date: Mon Aug 6 19:04:05 2018 -0700
Added move support for `Resources`.
Review: https://reviews.apache.org/r/68197/
{noformat}
{noformat}
commit 23cb8da5f267963232c2985c82de721dbf0ef72d
Author: Meng Zhu <mz...@mesosphere.io>
Date: Mon Aug 6 19:17:21 2018 -0700
Added tests for `Resources` move semantics.
Review: https://reviews.apache.org/r/68242/
{noformat}
{noformat}
commit 8132c64502717e10277297f4958f5f78a7b96093
Author: Meng Zhu <mz...@mesosphere.io>
Date: Mon Aug 6 19:30:55 2018 -0700
Added ref-qualified addition operations to `Resources`.
This patch futher adds move support for `Resources`
addition operations when the lhs is an rvalue reference.
Review: https://reviews.apache.org/r/68248/
{noformat}
[~mzhu] I let you close it if we don't need support reference qualified overloads for {{operator+(Resource_)}}
> Add move support to the Resources / Resource_ wrappers.
> -------------------------------------------------------
>
> Key: MESOS-9110
> URL: https://issues.apache.org/jira/browse/MESOS-9110
> Project: Mesos
> Issue Type: Improvement
> Reporter: Benjamin Mahler
> Assignee: Meng Zhu
> Priority: Major
> Labels: mesosphere, performance
>
> Currently, the Resources / Resource_ wrappers do not have move support. Since copying resources are rather expensive (especially when there's large ports ranges or metadata like reservations / labels), we should add move support to reduce copying automatically where possible:
> * Constructors for both Resources and Resource_
> * +, +=, addition operations: with addition we sometimes need to add the resource to the vector in which case we can move if taking an rvalue
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)