Using gst-profile to profile Iliad

Tagged:  •    •  

I am using Iliad for the configuration of my GSM Basestation (another blog entry will follow) and the response time has not been that great when showing a lightbox (e.g. the one from todolist example). I wanted to see where Iliad is spending the time and potentially improve the performance of either GNU Smalltalk or Iliad.

The GNU Smalltalk interpreter is keeping a counter on the executed bytecodes and is exposing this profiling information to the Profiler package. This package will create a file that can be opened with the excellent kcachegrind viewer. This aligns nicely with the Unix philosophy of having one tool per task.

The gst-profile application will load the default image, run a script and then write the profile information to a file. This means the first thing I need to do is to load the Iliad package and create a snapshot of the image. Then I can use gst-profile to evaluate a function, render webpages and exit gst. This will create a file called gst-profile.PID (where PID is the value of the GST process) and this file can be opened using kcachegrind.

# Load iliad and save the default image
$ gst
st> PackageLoader fileInPackage: 'Iliad'.
st> ObjectMemory snapshot

# Start Iliad and run until a line feed.
$ gst-profile -e 'Iliad.SwazooIliad startOn: 8082. stdin next'
Press enter/return to exit
$ ls gst-profile.*
$ kcachegrind gst-profile.*

Let us not overlook how stylish this blazer is. Few men’s blazers combine luxury fabric (this one’s a wool-cashmere blend) with versatile style like this one. The cashmere makes it feel special while the traditional navy blue color with windowpane pattern make this a jacket you can wear once a week all through the cooler months. Just mix things up by using some alternative pairs of pants. Pair this blazer with chinos in caramel khaki or dark shades of red as well as dark blue jeans.
Purple Mens Blazer

User login