[Commits] [SCM] claws branch, master, updated. 3.17.0-163-gc27905f
ticho at claws-mail.org
ticho at claws-mail.org
Tue Nov 13 23:32:45 CET 2018
The branch, master has been updated
via c27905f5dc36acedbbf022d26ed52719c9289241 (commit)
from e725cc0f9d8fc64f896977c786b016b56d15d087 (commit)
Summary of changes:
src/plugins/rssyl/rssyl_deleted.c | 10 +++++-----
src/plugins/rssyl/rssyl_parse_feed.c | 7 -------
src/plugins/rssyl/rssyl_update_feed.c | 3 ++-
3 files changed, 7 insertions(+), 13 deletions(-)
- Log -----------------------------------------------------------------
commit c27905f5dc36acedbbf022d26ed52719c9289241
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Tue Nov 13 23:31:37 2018 +0100
Further optimize .deleted file reading in RSSyl.
When updating a feed, only read the file once at the
beginning, instead of reading and rereading it for
every parsed feed item.
diff --git a/src/plugins/rssyl/rssyl_deleted.c b/src/plugins/rssyl/rssyl_deleted.c
index 23fac15..a264365 100644
--- a/src/plugins/rssyl/rssyl_deleted.c
+++ b/src/plugins/rssyl/rssyl_deleted.c
@@ -286,13 +286,13 @@ gboolean rssyl_deleted_check(RFolderItem *ritem, FeedItem *fitem)
cm_return_val_if_fail(fitem != NULL, FALSE);
debug_print("RSSyl: (DELETED) check\n");
- rssyl_deleted_update(ritem);
+
+ if (ritem->deleted_items == NULL)
+ return FALSE;
+
if (g_slist_find_custom(ritem->deleted_items, (gconstpointer)fitem,
- _rssyl_deleted_check_func) != NULL) {
- rssyl_deleted_free(ritem);
+ _rssyl_deleted_check_func) != NULL)
return TRUE;
- }
- rssyl_deleted_free(ritem);
return FALSE;
}
diff --git a/src/plugins/rssyl/rssyl_parse_feed.c b/src/plugins/rssyl/rssyl_parse_feed.c
index 616e798..b7a49dd 100644
--- a/src/plugins/rssyl/rssyl_parse_feed.c
+++ b/src/plugins/rssyl/rssyl_parse_feed.c
@@ -209,10 +209,6 @@ gboolean rssyl_parse_feed(RFolderItem *ritem, Feed *feed)
return TRUE;
}
- /* Populate the ->deleted_items list so that we can check it when
- * adding each item. */
- rssyl_deleted_update(ritem);
-
/* Parse each item in the feed, adding or updating existing items if
* necessary */
if( feed_n_items(feed) > 0 )
@@ -223,9 +219,6 @@ gboolean rssyl_parse_feed(RFolderItem *ritem, Feed *feed)
rssyl_expire_items(ritem, feed);
}
- /* Clean up ->deleted_items */
- rssyl_deleted_free(ritem);
-
folder_item_scan(&ritem->item);
folder_item_update_thaw();
diff --git a/src/plugins/rssyl/rssyl_update_feed.c b/src/plugins/rssyl/rssyl_update_feed.c
index 2e6645d..e0ad115 100644
--- a/src/plugins/rssyl/rssyl_update_feed.c
+++ b/src/plugins/rssyl/rssyl_update_feed.c
@@ -259,6 +259,8 @@ gboolean rssyl_update_feed(RFolderItem *ritem, RSSylVerboseFlags verbose)
return ctx->success;
}
+ rssyl_deleted_update(ritem);
+
debug_print("RSSyl: STARTING TO PARSE FEED\n");
if( ctx->success && !(ctx->success = rssyl_parse_feed(ritem, ctx->feed)) ) {
/* both libcurl and libfeed were happy, but we weren't */
@@ -291,7 +293,6 @@ gboolean rssyl_update_feed(RFolderItem *ritem, RSSylVerboseFlags verbose)
/* Prune our deleted items list of items which are no longer in
* upstream feed. */
- rssyl_deleted_update(ritem);
rssyl_deleted_expire(ritem, ctx->feed);
rssyl_deleted_store(ritem);
rssyl_deleted_free(ritem);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list