Bug 36626

Summary: tpl_log_manager_get_filtered_events_async is pretty slow
Product: Telepathy Reporter: Guillaume Desmottes <guillaume.desmottes>
Component: loggerAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: biru.ionut
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 35882    
Bug Blocks:    
Attachments: logger logs from empathy-chat
logger logs from empathy-chat, with hacked log_store_xml_get_dates

Description Guillaume Desmottes 2011-04-27 01:13:34 UTC
An Empathy user reported that it takes a few seconds before empathy-chat opens the chat window when starting a new chat. After some digging, we discovered that a lot of time was spent in log_store_xml_get_dates() (cf logs with timestamps) as it has to load each file and execute  a regexep on it.

Do we really need to parse each files? Shouldn't we start from the older files and stop as soon as we found enough messages?
Comment 1 Guillaume Desmottes 2011-04-27 01:14:18 UTC
Created attachment 46111 [details]
logger logs from empathy-chat
Comment 2 Frederic Peters 2011-04-27 01:25:04 UTC
Created attachment 46113 [details]
logger logs from empathy-chat, with hacked log_store_xml_get_dates

Here is a log after I removed the calls to log_store_xml_match_in_file from log_store_xml_get_dates.
Comment 3 Nicolas Dufresne 2011-04-27 08:09:15 UTC
(In reply to comment #2)
> Created an attachment (id=46113) [details]
> logger logs from empathy-chat, with hacked log_store_xml_get_dates
> 
> Here is a log after I removed the calls to log_store_xml_match_in_file from
> log_store_xml_get_dates.

This is the goal, but we need to fix 35882 first.
Comment 4 Nicolas Dufresne 2011-05-05 12:38:41 UTC
The performance should already be a lot better now with the current trunk, but I'll keep this bug open until we have positive report.
Comment 5 Nicolas Dufresne 2011-05-26 15:13:42 UTC
We have made another step in optimizing this as we don't use g_list_insert_sorted() anymore to merge different lists.
Comment 6 Nicolas Dufresne 2011-06-07 06:35:46 UTC
Anyone have tried the new version ? or still care about this ?

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.