Move message filtering to C++
The filter callback is called very often (O(messages)). The current filter model shows some significant overhead in QML internals. Moving that to C++ makes it quite a bit faster.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "filetypesingleton.h"
|
||||
#include "matriximageprovider.h"
|
||||
#include "messageeventmodel.h"
|
||||
#include "messagefiltermodel.h"
|
||||
#include "neochatconfig.h"
|
||||
#include "neochatroom.h"
|
||||
#include "neochatuser.h"
|
||||
@@ -107,6 +108,7 @@ int main(int argc, char *argv[])
|
||||
qmlRegisterType<RoomListModel>("org.kde.neochat", 1, 0, "RoomListModel");
|
||||
qmlRegisterType<UserListModel>("org.kde.neochat", 1, 0, "UserListModel");
|
||||
qmlRegisterType<MessageEventModel>("org.kde.neochat", 1, 0, "MessageEventModel");
|
||||
qmlRegisterType<MessageFilterModel>("org.kde.neochat", 1, 0, "MessageFilterModel");
|
||||
qmlRegisterType<PublicRoomListModel>("org.kde.neochat", 1, 0, "PublicRoomListModel");
|
||||
qmlRegisterType<UserDirectoryListModel>("org.kde.neochat", 1, 0, "UserDirectoryListModel");
|
||||
qmlRegisterType<EmojiModel>("org.kde.neochat", 1, 0, "EmojiModel");
|
||||
|
||||
Reference in New Issue
Block a user