[evolution-data-server/openismus-work] Optimize e-book-backend-file.c slightly.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work] Optimize e-book-backend-file.c slightly.
- Date: Sun, 12 Jun 2011 22:50:00 +0000 (UTC)
commit 4a33f69053543a68a28beb6b3833679d07776930
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun Jun 12 19:51:44 2011 +0900
Optimize e-book-backend-file.c slightly.
When the said book view only requested the UID field, avoid consulting
the DB when looping over summery ids.
addressbook/backends/file/e-book-backend-file.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 15c62df..ab9107e 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -630,6 +630,11 @@ book_view_thread (gpointer data)
if (!e_flag_is_set (closure->running))
break;
+ if (uid_only) {
+ notify_update_vcard (book_view, uid_only, TRUE, id, NULL);
+ continue;
+ }
+
string_to_dbt (id, &id_dbt);
memset (&vcard_dbt, 0, sizeof (vcard_dbt));
vcard_dbt.flags = DB_DBT_MALLOC;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]