changed std::vector into std::set in notification system, hence removing lots of std::find(std::vector::begin(),std::vector::end(),T), causing quadratic costs in multiple places.

This commit is contained in:
csoler 2018-06-21 15:46:59 +02:00
parent 6139632378
commit 84699db744
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
36 changed files with 208 additions and 272 deletions

View file

@ -40,8 +40,8 @@ class RsGxsChanges
public:
RsGxsChanges(): mService(0){}
RsTokenService *mService;
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > mMsgs;
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > mMsgsMeta;
std::map<RsGxsGroupId, std::set<RsGxsMessageId> > mMsgs;
std::map<RsGxsGroupId, std::set<RsGxsMessageId> > mMsgsMeta;
std::list<RsGxsGroupId> mGrps;
std::list<RsGxsGroupId> mGrpsMeta;
};