[Bug 35882] Different event type should be logged in different files

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu May 5 18:19:42 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=35882

David Laban <david.laban at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david.laban at collabora.co.uk

--- Comment #2 from David Laban <david.laban at collabora.co.uk> 2011-05-05 09:19:42 PDT ---
http://cgit.collabora.co.uk/git/user/nicolas/telepathy-logger.git/commit/?h=split-event&id=14314bd21d31b8502e85111a6dabc6fa09a2f56a
-log_store_xml_get_timestamp_filename (void)
+log_store_xml_get_timestamp_filename (GType type)

would you object to 
+log_store_xml_get_timestamp_filename (TplEvent *event)
(which looks at the timestamp of the event as well as its type) or 
+log_store_xml_get_timestamp_filename (GType type, gint64 timestamp) ?
I think I might need this for logging message-edits.


http://cgit.collabora.co.uk/git/user/nicolas/telepathy-logger.git/commit/?h=split-event&id=c22ca3933c5ef47a19682e7809c03469b8018a1d

Have we released a logger which puts call events in with text events? If so,
get_dates(CALL) will miss some days for some users. If we haven't made any such
release then we're safe.
(similarly with
http://cgit.collabora.co.uk/git/user/nicolas/telepathy-logger.git/commit/?h=split-event&id=1ce4c111999aa5dfae42f4b3a326fca5c2678ee7
)


http://cgit.collabora.co.uk/git/user/nicolas/telepathy-logger.git/commit/?h=split-event&id=429771478868a128f9a8b1be7d77c872b5fb8021
kudos for exposing GQueues in the api (they're much nicer to work with) but:

- g_queue_push_tail (&events, event);
+ {
+ while (index != NULL &&
+ tpl_event_get_timestamp (event) <
+ tpl_event_get_timestamp (TPL_EVENT (index->data)))
+ index = g_list_next (index);
+
+ if (index != NULL)
+ {
+ g_queue_insert_after (events, index, event);
+ index = g_list_next (index);
+ }
+ else
+ {
+ g_queue_push_tail (events, event);
+ index = events->head;
+ }
+
+ num_events++;
+ }
Do you mean g_queue_insert_sorted() or something else?
Alternatively, could you just throw away most of this code and just
g_queue_sort() at the end?

+ else if (type_mask & TPL_EVENT_MASK_CALL)
do you mean:
+
+ if (type_mask & TPL_EVENT_MASK_CALL)

The poet in me is pining for g_queue_concat (grand_list, list_to_swallow
(transfer full)) (=== g_list_concat (grand_list->tail, queue_to_swallow->head); 
grand_list->tail = list_to_swallow->tail; 
grand_list->length += queue_to_swallow->length; 
*queue_to_swallow = G_QUEUE_INIT; 
g_queue_free(queue_to_swallow);) and/or g_queue_merge_sorted (grand_list,
list_to_swallow) so that we don't have to pass in a mutable queue.

I can't quite see how these changes will make opening text chats any faster,
but I can see how they would make extracting a call log faster (assuming that
we haven't made any releases with the mixed log format, in which case it would
break extracting a call log)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list