Skip to content
Snippets Groups Projects
Verified Commit b31e74d9 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Reserve memory for rooms in completer

parent 0e60c09b
No related branches found
No related tags found
No related merge requests found
Pipeline #909 passed
......@@ -15,6 +15,10 @@ RoomsModel::RoomsModel(bool showOnlyRoomWithAliases, QObject *parent)
{
std::vector<std::string> rooms_ = cache::joinedRooms();
roomInfos = cache::getRoomInfo(rooms_);
if (!showOnlyRoomWithAliases_) {
roomids.reserve(rooms_.size());
roomAliases.reserve(rooms_.size());
}
for (const auto &r : rooms_) {
auto roomAliasesList = cache::client()->getRoomAliases(r);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment