Hello community, here is the log from the commit of package evolution-data-server checked in at Tue Jun 27 17:21:56 CEST 2006. -------- --- GNOME/evolution-data-server/evolution-data-server.changes 2006-06-16 12:18:45.000000000 +0200 +++ evolution-data-server/evolution-data-server.changes 2006-06-27 11:50:51.000000000 +0200 @@ -1,0 +2,7 @@ +Mon Jun 26 11:19:11 CEST 2006 - kharish@novell.com + +- Fixes (bnc) + 187529 - Sequence cache population requests for better + performance. + +------------------------------------------------------------------ New: ---- bnc-187529-calendar-cache-population.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ evolution-data-server.spec ++++++ --- /var/tmp/diff_new_pack.CYqwfW/_old 2006-06-27 17:20:58.000000000 +0200 +++ /var/tmp/diff_new_pack.CYqwfW/_new 2006-06-27 17:20:58.000000000 +0200 @@ -18,7 +18,7 @@ Autoreqprov: on Summary: Evolution Data Server Version: 1.6.0 -Release: 62 +Release: 64 Source: ftp://ftp.gnome.org/pub/gnome/sources/evolution-data-server/1.6/%{name}-%{version}.tar.bz2 #Patch3: evolution-data-server-gcc4.patch Patch5: evolution-data-server-configure.patch @@ -98,6 +98,7 @@ Patch77: bnc-170052-eds-crash.patch Patch78: email-appears-twice.patch Patch79: bnc-183819-evo-crashed-closing-offline.patch +Patch80: bnc-187529-calendar-cache-population.patch Url: http://www.gnome.org BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: libsoup >= 2.2.6 mozilla-nss @@ -206,6 +207,7 @@ %patch77 %patch78 %patch79 +%patch80 %build rename no nb po/no.* @@ -256,6 +258,10 @@ %{prefix}/share/gtk-doc/html/* %changelog -n evolution-data-server +* Mon Jun 26 2006 - kharish@novell.com +- Fixes (bnc) + 187529 - Sequence cache population requests for better + performance. * Fri Jun 16 2006 - vvaradhan@novell.com - Fixes (bnc) 183819 - Evolution crashed while closing in offline mode ++++++ bnc-187529-calendar-cache-population.patch ++++++ --- calendar/backends/groupwise/e-cal-backend-groupwise.c.orig 2006-06-26 14:26:10.000000000 +0530 +++ calendar/backends/groupwise/e-cal-backend-groupwise.c 2006-06-26 14:30:26.000000000 +0530 @@ -132,13 +132,19 @@ populate_cache (ECalBackendGroupwise *cb EGwConnectionStatus status; ECalComponent *comp; GList *list = NULL, *l; - gboolean done = FALSE; + gboolean done = FALSE, forward = FALSE; int cursor = 0; guint32 total, num = 0; - int percent = 0; + int percent = 0, i; const char *position = E_GW_CURSOR_POSITION_END; icalcomponent_kind kind; const char *type; + EGwFilter* filter[3]; + char l_str[26]; + char h_str[26]; + icaltimetype temp; + struct tm tm; + time_t h_time, l_time; priv = cbgw->priv; kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgw)); @@ -155,66 +161,101 @@ populate_cache (ECalBackendGroupwise *cb else type = "Task"; - status = e_gw_connection_create_cursor (priv->cnc, - priv->container_id, - "recipients message recipientStatus attachments default peek", NULL, &cursor); - if (status != E_GW_CONNECTION_STATUS_OK) { - e_cal_backend_groupwise_notify_error_code (cbgw, status); - g_mutex_unlock (mutex); - return status; - } - - while (!done) { - - status = e_gw_connection_read_cursor (priv->cnc, priv->container_id, cursor, FALSE, CURSOR_ITEM_LIMIT, position, &list); + /* Fetch the data with a bias to present, near past/future */ + temp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ()); + i = g_ascii_strtod (g_getenv ("PRELOAD_WINDOW_DAYS")? g_getenv ("PRELOAD_WINDOW_DAYS"):"15", NULL); + temp.day -= i; + icaltime_normalize (temp); + l_time = icaltime_as_timet_with_zone (temp, icaltimezone_get_utc_timezone ()); + gmtime_r (&l_time, &tm); + strftime (l_str, 26, "%Y-%m-%dT%H:%M:%SZ", &tm); + temp.day += (2*i); + icaltime_normalize (temp); + h_time = icaltime_as_timet_with_zone (temp, icaltimezone_get_utc_timezone ()); + gmtime_r (&h_time, &tm); + strftime (h_str, 26, "%Y-%m-%dT%H:%M:%SZ", &tm); + + filter[0] = e_gw_filter_new (); + e_gw_filter_add_filter_component (filter[0], E_GW_FILTER_OP_GREATERTHAN_OR_EQUAL, "startDate", l_str); + e_gw_filter_add_filter_component (filter[0], E_GW_FILTER_OP_LESSTHAN_OR_EQUAL, "startDate", h_str); + e_gw_filter_group_conditions (filter[0], E_GW_FILTER_OP_AND, 2); + filter[1] = e_gw_filter_new (); + e_gw_filter_add_filter_component (filter[1], E_GW_FILTER_OP_GREATERTHAN, "startDate", h_str); + filter[2] = e_gw_filter_new (); + e_gw_filter_add_filter_component (filter[2], E_GW_FILTER_OP_LESSTHAN, "startDate", l_str); + + for (i = 0; i < 3; i++) { + status = e_gw_connection_create_cursor (priv->cnc, + priv->container_id, + "recipients message recipientStatus attachments default peek", filter[i], &cursor); if (status != E_GW_CONNECTION_STATUS_OK) { e_cal_backend_groupwise_notify_error_code (cbgw, status); g_mutex_unlock (mutex); return status; } - for (l = list; l != NULL; l = g_list_next(l)) { - EGwItem *item; - char *progress_string = NULL; + done = FALSE; + if (i == 1) { + position = E_GW_CURSOR_POSITION_START; + forward = TRUE; + + } else { + position = E_GW_CURSOR_POSITION_END; + forward = FALSE; + } - item = E_GW_ITEM (l->data); - comp = e_gw_item_to_cal_component (item, cbgw); - g_object_unref (item); + while (!done) { - /* Show the progress information */ - num++; - percent = ((float) num/total) * 100; - - /* FIXME The total obtained from the server is wrong. Sometimes the num can - be greater than the total. The following makes sure that the percentage is not >= 100 */ - - if (percent > 100) - percent = 99; - - progress_string = g_strdup_printf (_("Loading %s items"), type); - e_cal_backend_notify_view_progress (E_CAL_BACKEND (cbgw), progress_string, percent); + status = e_gw_connection_read_cursor (priv->cnc, priv->container_id, cursor, forward, CURSOR_ITEM_LIMIT, position, &list); + if (status != E_GW_CONNECTION_STATUS_OK) { + e_cal_backend_groupwise_notify_error_code (cbgw, status); + g_mutex_unlock (mutex); + return status; + } + for (l = list; l != NULL; l = g_list_next(l)) { + EGwItem *item; + char *progress_string = NULL; + + item = E_GW_ITEM (l->data); + comp = e_gw_item_to_cal_component (item, cbgw); + g_object_unref (item); + + /* Show the progress information */ + num++; + percent = ((float) num/total) * 100; - if (E_IS_CAL_COMPONENT (comp)) { - char *comp_str; + /* FIXME The total obtained from the server is wrong. Sometimes the num can + be greater than the total. The following makes sure that the percentage is not >= 100 */ + + if (percent > 100) + percent = 99; + + progress_string = g_strdup_printf (_("Loading %s items"), type); + e_cal_backend_notify_view_progress (E_CAL_BACKEND (cbgw), progress_string, percent); - e_cal_component_commit_sequence (comp); - if (kind == icalcomponent_isa (e_cal_component_get_icalcomponent (comp))) { - comp_str = e_cal_component_get_as_string (comp); - e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), (const char *) comp_str); - g_free (comp_str); + if (E_IS_CAL_COMPONENT (comp)) { + char *comp_str; + + e_cal_component_commit_sequence (comp); + if (kind == icalcomponent_isa (e_cal_component_get_icalcomponent (comp))) { + comp_str = e_cal_component_get_as_string (comp); + e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), (const char *) comp_str); + g_free (comp_str); + } + e_cal_backend_cache_put_component (priv->cache, comp); + g_object_unref (comp); } - e_cal_backend_cache_put_component (priv->cache, comp); - g_object_unref (comp); + g_free (progress_string); } - g_free (progress_string); + + if (!list || g_list_length (list) == 0) + done = TRUE; + g_list_free (list); + list = NULL; + position = E_GW_CURSOR_POSITION_CURRENT; } - - if (!list || g_list_length (list) == 0) - done = TRUE; - g_list_free (list); - list = NULL; - position = E_GW_CURSOR_POSITION_CURRENT; - } - e_gw_connection_destroy_cursor (priv->cnc, priv->container_id, cursor); + e_gw_connection_destroy_cursor (priv->cnc, priv->container_id, cursor); + g_object_unref (filter[i]); + } e_cal_backend_notify_view_done (E_CAL_BACKEND (cbgw), GNOME_Evolution_Calendar_Success); g_mutex_unlock (mutex); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de