> On None, Cyberbeat wrote: > >
I am not confident with this solution anymore. It is too slow for large chatrooms ( > 100 people): - swiching tabs in chatwindow is slow, even if I optimize the initial fill of the modell with an n*log(n) algorithm/structure - changing online-status/add/remove many people once is too slow What I would prefer now: - do the sorting in the kopetechatsession But there are a few problems which have to be solved: a) the myself-contact should also be added to the chatsession's members list (many other classes have to adapt to that behaviour, would be nice to get some help then) b) the add/remove/..-signals emitted by the chatsession should also have an index to be more efficient c) perhaps multiple add/remove/.. slot-calls should aggregated with a QTimer (with a sane timeout) to be able to do the sorted inserting more efficient. I think the internal contact-storage-structure has to be a QList, even it is slow for inserting: - some model-methods need indexes: data() and beginInsertItem() and beginRemoveItem() - if many items have to be inserted/removed it could be done with a temporary QMap structure. - Cyberbeat ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard.kde.org/r/1862/#review2668 ----------------------------------------------------------- On 2009-10-16 17:11:52, Cyberbeat wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviewboard.kde.org/r/1862/ > ----------------------------------------------------------- > > (Updated 2009-10-16 17:11:52) > > > Review request for Kopete. > > > Summary > ------- > > - Changed the chatmemberlistmodel so that it sorts the contacts by > onlinestatus-weight/nickname (important for IRC). > - chatmemberlistmodel manages it's own sorted list of contacts > - implemented the "FIXME"s so that the add/remove slots do not call "reset()" > anymore, which takes a lot of time for big irc channels > - added signal/slot for nickname-change to chatsession (model needs to know > for resorting) > > > Diffs > ----- > > branches/KDE/4.3/kdenetwork/kopete/libkopete/chatsessionmemberslistmodel.h > 1035610 > > branches/KDE/4.3/kdenetwork/kopete/libkopete/chatsessionmemberslistmodel.cpp > 1035610 > branches/KDE/4.3/kdenetwork/kopete/libkopete/kopetechatsession.h 1035610 > branches/KDE/4.3/kdenetwork/kopete/libkopete/kopetechatsession.cpp 1035610 > > Diff: http://reviewboard.kde.org/r/1862/diff > > > Testing > ------- > > works for me with IRC, ICQ,.. > > > Screenshots > ----------- > > IRC with sorted members > http://reviewboard.kde.org/r/1862/s/228/ > > > Thanks, > > Cyberbeat > > _______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel