mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Meng Zhu <m...@mesosphere.io>
Subject Review Request 69032: Optimized resources filter operation.
Date Tue, 16 Oct 2018 23:16:01 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69032/
-----------------------------------------------------------

Review request for mesos, Benjamin Mahler and Gastón Kleiman.


Bugs: MESOS-9325
    https://issues.apache.org/jira/browse/MESOS-9325


Repository: mesos


Description
-------

Currently, `Resources::filter()` operation uses `add()` which
scans the resources vector, a O(n) operation. This is not
necessary. `filter()` operation should only remove `Resource`
entires. This patch optimizes the performance by directly
`push_back` the resource to the vector without scanning.


Diffs
-----

  src/common/resources.cpp f0f3df579550d874e477e2d6e7d0e87df079358a 
  src/v1/resources.cpp 4d2b64f6e30ef96b47fc0b72b00158864e245650 


Diff: https://reviews.apache.org/r/69032/diff/1/


Testing
-------

make check


Thanks,

Meng Zhu


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message