Lower the complexity of the group filtering algorithm (#380)
The old algorithm during filtering will check every room if it's part of the group. O(N*G) The room ids for a group are now stored in a map for faster lookup so the search can be completed in a single pass. O(N)
Showing
- src/ChatPage.cpp 2 additions, 2 deletionssrc/ChatPage.cpp
- src/CommunitiesList.cpp 5 additions, 5 deletionssrc/CommunitiesList.cpp
- src/CommunitiesList.h 2 additions, 2 deletionssrc/CommunitiesList.h
- src/CommunitiesListItem.h 3 additions, 3 deletionssrc/CommunitiesListItem.h
- src/RoomList.cpp 30 additions, 23 deletionssrc/RoomList.cpp
- src/RoomList.h 10 additions, 9 deletionssrc/RoomList.h
Loading
Please register or sign in to comment