From 3a7b275f52e4905cc9b8f4f5c83d5c64c5ec20c1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 6 Nov 2014 21:40:38 +0000 Subject: doubles search algorithm optimized git-svn-id: http://svn.miranda-ng.org/main/trunk@10920 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewsAggregator/Src/CheckFeed.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/NewsAggregator') diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index e2deb0f122..cff4873516 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -136,6 +136,10 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin olddbei.pBlob = pbBuffer; db_event_get(hDbEvent, &olddbei); + // there's no need to look for the elder events + if (olddbei.timestamp < stamp) + break; + if (olddbei.cbBlob == cbOrigLen + 1 && !lstrcmpA((char*)olddbei.pBlob, pszTemp)) { MesExist = true; break; -- cgit v1.2.3