Re: [Evolution-hackers] Reviewing imap_update_summary
- From: Philip Van Hoof <spam pvanhoof be>
- To: Evolution Hackers <evolution-hackers gnome org>
- Subject: Re: [Evolution-hackers] Reviewing imap_update_summary
- Date: Sun, 22 Oct 2006 16:29:11 +0200
On Sun, 2006-10-22 at 15:41 +0200, Philip Van Hoof wrote:
> In the code I have found no real reason to why this was done in
> separated loops (steps) rather than one step and at the end of the loop,
> free the data already. Especially for the third step (x), which seem to
> consume most memory while it's happening.
After measuring the memory usage of the implementation, it saw that it's
not the third step but the first that is allocating 90% of the memory.
That's this loop:
fetch_data = g_ptr_array_new ();
messages = g_ptr_array_new ();
while ((type = camel_imap_command_response (store, &resp, ex) ==
CAMEL_IMAP_RESPONSE_UNTAGGED) {
data = parse_fetch_response (imap_folder, resp);
g_free (resp);
...
}
I measured this by simply interrupting the function (returning it), and
running it in valgrind. The first one at the very start allocates
everything (while receiving the result).
--
Philip Van Hoof, software developer at x-tend
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: vanhoof at x-tend dot be
http://www.pvanhoof.be - http://www.x-tend.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]