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

Meng Zhu commented on MESOS-9722:
---------------------------------

Based on a recent internal test, the sort() does not take much time. And this 
ticket would introduce some extra complexities. 

The review above (https://reviews.apache.org/r/70419) is pretty ready though. 
But we decide to shelve it for now.  Move this ticket back to `accepted`.

> Refactor the sorter interface to enable lazy sorting.
> -----------------------------------------------------
>
>                 Key: MESOS-9722
>                 URL: https://issues.apache.org/jira/browse/MESOS-9722
>             Project: Mesos
>          Issue Type: Improvement
>          Components: allocation
>            Reporter: Meng Zhu
>            Assignee: Meng Zhu
>            Priority: Major
>              Labels: performance, resource-management
>
> Currently, the only way for getting a sorted client from sorter is through:
> {noformat}
> vector<string> Sorter::sort()
> {noformat}
> This sorts all the active clients in the tree and returns all of them in a 
> single vector. This is inefficient if the callers end up only needing a few 
> of clients (e.g. when allocating one agent, only one or a few roles are 
> allocated).
> We could refactor the interface to return an iterator-like handle and then 
> callers can query the next the client in the sorting order. This would pave 
> the way for lazy sorting (i.e. only get the nth client) and improve 
> performance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to