Real-life optimization work
Posted Nov 3, 2005 9:16 UTC (Thu) by
rossburton (subscriber, #7254)
In reply to:
Real-life optimization work by jwb
Parent article:
All hail the speed demons (O'Reillynet)
Ah the classic "foo takes 20M it's evil!" argument.
10M of virtual memory, most of which is shared. That's GTK+, Pango, GConf, Bonobo, for a start, and often the Evolution calendar libraries being loaded to display your appointments and tasks in the calendar. Heap wise, the clock uses a meg, and the executable code itself is 72K.
pmap is your friend. Bannish the ignorance and see how memory is actually being used! I found an interesting bug in Evolution Data Server which resulted in vastly inflated "ps" memory counts: threads were not being destroyed correctly and for every thread (read: contact search) 8M was added to the VM size. Of this 8M only 4 bytes was actually used (it's the thread stack, and the thread didn't return anything), but it's easy to get "ps" sizes in the hundred of megabytes this way. One line patch later, bug fixed.
(
Log in to post comments)