I'm learning and would love to hear ideas about how
best to benchmark Smalltalk rendering. I tried this very crude test in
a Workspace:
loops := 100.
rect := Display boundingBox.
a := Time millisecondsToRun: [
loops
timesRepeat: [
Display
forceToScreen: rect.
].
].
Transcript show: a / loops asFloat; cr.
With a full-screen window on a current model Mac Pro with stock
Pharo 3 image and VM it reports 47 ms/update. On my Surface Pro 2
(Windows 8) it is takes only 1.1 ms. I'm kind of shocked by that number
in comparison. It's a lower resolution screen but still.
I know full screen updates are not the norm for many
applications but they're still very important. Also keep in mind this
is just the low level screen update, no Morphic overhead. Ideally the
display update takes less than a millisecond to leave time for all the
higher level rendering.
For performance assessment I'd like to have a nice Frames Per
Second graph running in the corner as well as repeatable test cases
matching common uses (scrolling, full updates, partial updates, empty
window, densely packed grid, text editor, etc) that could be run across
platforms.
After that I wonder about profiling. Can accurate timed traces
be done from top to bottom? I imagine it would at least get murky at
the VM boundary.
I also noticed logic to limit display updates to 50 times a
second, presumably to minimize CPU usage. CPU usage would also be
reduced by optimizing rendering but in any case I'd like to see an
update rate synchronized with the video rate or faster (60 or more).
That would minimize tearing and allow for no perceivable UI lag.