[ https://issues.apache.org/jira/browse/MESOS-5700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15380797#comment-15380797 ]
Klaus Ma commented on MESOS-5700: --------------------------------- Just did a profiling for Resources class based on the benchmark, please refer to the attachment for the detail. Here's suggestion to improve the performance: 1. In reservation.perf.log, it shows {{operator!=(string, string)}} in {{addable/subtractable}} is the heavy function; so I'm thinking to * Make name of Resource to be enum instread of string (as we discussed in the doc) * Introduce roleId (uint64_t), similar to uid in Linux; {{roleId}} is used within Mesos master/agent 2. In port.perf.log, it shows {{ranges validation}} is the heavy function; no conclusion for now, but it's better to refine {{Resource::validate}}: * role validation is not necessary in every operator/loop * ranges validation maybe not necessary in every operator/loop, {{coalesce}} may handle it (investigating) cc [~bmahler]/[~gyliu]/[~alexr] > Benchmark for Resource class (protobuf vs. C++) > ----------------------------------------------- > > Key: MESOS-5700 > URL: https://issues.apache.org/jira/browse/MESOS-5700 > Project: Mesos > Issue Type: Bug > Reporter: Klaus Ma > Assignee: Klaus Ma > > Add benchmark of Resource class for Allocation Performance. -- This message was sent by Atlassian JIRA (v6.3.4#6332)