aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-folder-view.c27
-rw-r--r--mail/message-list.c15
3 files changed, 46 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 44d6e157d5..15e20cb515 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2005-04-28 Not Zed <NotZed@Ximian.com>
+
+ * message-list.c: add some message list loading/profiling points,
+ "list".
+
+ * em-folder-view.c: add some message display/loading profiling
+ points, "goto".
+
2005-04-12 Not Zed <NotZed@Ximian.com>
** See bug #273752
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 8a5690ef85..a0431f65b6 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -69,6 +69,7 @@
#include <e-util/e-dialog-utils.h>
#include <e-util/e-icon-factory.h>
#include <e-util/e-print.h>
+#include <e-util/e-profile-event.h>
#include "em-format-html-display.h"
#include "em-format-html-print.h"
@@ -162,6 +163,14 @@ static guint signals[LAST_SIGNAL];
static void emfv_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint time_stamp, EMFolderView *emfv);
static void emfv_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EMFolderView *emfv);
+#ifdef ENABLE_PROFILING
+static void
+emfv_format_complete(EMFormat *emf, EMFolderView *emfv)
+{
+ e_profile_event_emit("goto.done", emf->uid?emf->uid:"", 0);
+}
+#endif
+
static void
emfv_init(GObject *o)
{
@@ -197,7 +206,9 @@ emfv_init(GObject *o)
g_signal_connect(emfv->preview, "link_clicked", G_CALLBACK(emfv_format_link_clicked), emfv);
g_signal_connect(emfv->preview, "popup_event", G_CALLBACK(emfv_format_popup_event), emfv);
g_signal_connect (emfv->preview, "on_url", G_CALLBACK (emfv_on_url_cb), emfv);
-
+#ifdef ENABLE_PROFILING
+ g_signal_connect(emfv->preview, "complete", G_CALLBACK (emfv_format_complete), emfv);
+#endif
p->invisible = gtk_invisible_new();
g_signal_connect(p->invisible, "selection_get", G_CALLBACK(emfv_selection_get), emfv);
g_signal_connect(p->invisible, "selection_clear_event", G_CALLBACK(emfv_selection_clear_event), emfv);
@@ -620,6 +631,8 @@ emfv_set_folder_uri(EMFolderView *emfv, const char *uri)
static void
emfv_set_message(EMFolderView *emfv, const char *uid, int nomarkseen)
{
+ e_profile_event_emit("goto.uid", uid?uid:"<none>", 0);
+
/* This could possible race with other set messages, but likelyhood is small */
emfv->priv->nomarkseen = nomarkseen;
message_list_select_uid(emfv->list, uid);
@@ -1198,6 +1211,8 @@ emfv_mail_next(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderView *emfv = data;
+ e_profile_event_emit("goto.next", "", 0);
+
message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0);
}
@@ -2123,7 +2138,10 @@ emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeM
emfv_enable_menus(emfv);
g_object_unref (emfv);
return;
+
}
+
+ e_profile_event_emit("goto.loaded", emfv->displayed_uid, 0);
/** @Event: message.reading
* @Title: Viewing a message
@@ -2137,7 +2155,7 @@ emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeM
e_event_emit((EEvent *)eme, "message.reading", (EEventTarget *)target);
em_format_format((EMFormat *)emfv->preview, folder, uid, msg);
-
+
if (emfv->priv->seen_id)
g_source_remove(emfv->priv->seen_id);
@@ -2173,12 +2191,15 @@ emfv_message_selected_timeout(void *data)
emfv->priv->selected_uid = NULL;
g_object_ref (emfv);
/* TODO: we should manage our own thread stuff, would make cancelling outstanding stuff easier */
+ e_profile_event_emit("goto.load", emfv->displayed_uid, 0);
mail_get_message(emfv->folder, emfv->displayed_uid, emfv_list_done_message_selected, emfv, mail_thread_queued);
} else {
+ e_profile_event_emit("goto.empty", "", 0);
g_free(emfv->priv->selected_uid);
emfv->priv->selected_uid = NULL;
}
} else {
+ e_profile_event_emit("goto.empty", "", 0);
g_free(emfv->displayed_uid);
emfv->displayed_uid = NULL;
em_format_format((EMFormat *)emfv->preview, NULL, NULL, NULL);
@@ -2193,6 +2214,8 @@ emfv_message_selected_timeout(void *data)
static void
emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv)
{
+ e_profile_event_emit("goto.listuid", uid, 0);
+
if (emfv->preview_active) {
if (emfv->priv->selected_id != 0)
g_source_remove(emfv->priv->selected_id);
diff --git a/mail/message-list.c b/mail/message-list.c
index 9a7aaaaeda..573151743f 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -71,6 +71,7 @@
#include "em-utils.h"
#include <e-util/e-icon-factory.h>
+#include <e-util/e-profile-event.h>
#include "art/empty.xpm"
@@ -2796,7 +2797,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c
return;
camel_exception_init (&ex);
-
+
/* remove the cursor activate idle handler */
if (message_list->idle_id != 0) {
g_source_remove (message_list->idle_id);
@@ -3397,6 +3398,8 @@ regen_list_regen (struct _mail_msg *mm)
if (m->folder != m->ml->folder)
return;
+ e_profile_event_emit("list.getuids", m->folder->full_name, 0);
+
/* if we have hidedeleted on, use a search to find it out, merge with existing search if set */
if (!camel_folder_has_search_capability(m->folder)) {
/* if we have no search capability, dont let search or hide deleted work */
@@ -3515,6 +3518,8 @@ regen_list_regen (struct _mail_msg *mm)
}
MESSAGE_LIST_UNLOCK(m->ml, hide_lock);
+
+ e_profile_event_emit("list.threaduids", m->folder->full_name, 0);
if (!camel_operation_cancel_check(mm->cancel)) {
/* update/build a new tree */
@@ -3561,6 +3566,8 @@ regen_list_regened (struct _mail_msg *mm)
if (m->ml->folder != m->folder)
return;
+ e_profile_event_emit("list.buildtree", m->folder->full_name, 0);
+
if (m->dotree) {
if (m->ml->just_set_folder)
m->ml->just_set_folder = FALSE;
@@ -3600,6 +3607,8 @@ regen_list_free (struct _mail_msg *mm)
struct _regen_list_msg *m = (struct _regen_list_msg *)mm;
int i;
+ e_profile_event_emit("list.regenerated", m->folder->full_name, 0);
+
if (m->summary) {
for (i = 0; i < m->summary->len; i++)
camel_folder_free_message_info (m->folder, m->summary->pdata[i]);
@@ -3632,6 +3641,8 @@ static struct _mail_msg_op regen_list_op = {
static gboolean
ml_regen_timeout(struct _regen_list_msg *m)
{
+ e_profile_event_emit("list.regenerate", m->folder->full_name, 0);
+
m->ml->regen = g_list_prepend(m->ml->regen, m);
/* TODO: we should manage our own thread stuff, would make cancelling outstanding stuff easier */
e_thread_put (mail_thread_queued, (EMsg *)m);
@@ -3672,7 +3683,7 @@ mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, Came
{
struct _regen_list_msg *m;
GConfClient *gconf;
-
+
if (ml->folder == NULL) {
if (ml->search != search) {
g_free(ml->search);