performance: Avoid dup calls to subscribed_streams().

In stream_sort.sort_groups, we now have the caller
pass us in the list of streams, since they are getting
them anyway.
This commit is contained in:
Steve Howell
2019-12-27 20:45:28 +00:00
committed by Tim Abbott
parent 33246c5c49
commit 0711c7ea49
3 changed files with 12 additions and 8 deletions

View File

@@ -33,8 +33,7 @@ function filter_streams_by_search(streams, search_term) {
return filtered_streams;
}
exports.sort_groups = function (search_term) {
let streams = stream_data.subscribed_streams();
exports.sort_groups = function (streams, search_term) {
if (streams.length === 0) {
return;
}