Braindead Applets

6:03 pm General

It’s amazing how a 15 line script shows out the incredibly embarassing things we’re doing. That’s what Bryan wrote yesterday. Unfortunately GNOME applets are the DTrace whipping boy yet again, and I suspect Bryan’s talk at LISA is going to focus on the stock ticker applet [again].

The plan of attack was basically the following –

  • Understand the architecture of the panel applets
  • Try to identify the main CPU applet hogs
  • For each panel applet
    • Understand what each panel applet does
    • Determine the CPU useage during idle
    • Define a set of typical user tasks and determine the typical CPU useage for each task
  • Identify the typical startup for a given panel applet
    • Define whether that startup time is different for in and out of process applets
#!/usr/sbin/dtrace -s

#pragma D option quiet

syscall:::entry
/pid != $pid && strstr(curpsinfo->pr_psargs, "Applet") != NULL/ {
    @[execname] = count();
}

tick-1sec {
    printa(@);
    clear(@);
} 

We created a number of panels, and added all the applets that were available and ran the script. The script basically searches for the string ‘Applet’ which appears in the –oaf-activate-iid exec line, and does a count of all the syscalls. Then for every second, it prints out a count like follows –

  mixer_applet2                                                    46
  gweather-applet-                                                 49

  gweather-applet-                                                 11
  mixer_applet2                                                    39

  gweather-applet-                                                 43
  mixer_applet2                                                    44
...

Fortunately it doesn’t take much work to figure out what those applets are doing on an idle desktop, without any interaction with the applets. What are they doing? Polling generally, lots of polling. Over the next day or two, we’ll be looking at creating patches to help this.

Other breakout sessions included Startup Time, GTK+ libraries, Java applications, GNOME Terminal and Firefox, and I’m sure a whole heap of people will blog their results.

The positives were that Bryan liked our lime green Sun branded wallpaper, and thought the PDF viewer [evince] was just peachy.

Comments are closed.