Tuesday, June 4, 2013

Raspberry Pi Model A - Scratch performance with 2013-05-25 Raspbian image

With the new Raspbian 2013-05-25 image Scratch is suppose to be faster due to the work on the Pixman library.
So, I thought I would do a comparison between the new image and the 2012-07-15 image.
With the expectation that Scratch will mainly be used in schools and that these may be kitted out with Model As I did the testing on a Model A, so limited to 256MB of RAM

Video Below:


I download the images and flashed them fresh to 8GB SD cards - same make and model.
Then on boot up expanded the partition.
No updates were done and only a wireless keyboard/mouse USB dongle was plugged into the single USB port.

The Scratch program has 3 sprites + Stop Sprite. Each main sprite has 2 costumes and they move around the screen bouncing off the edge.
1 Sprite (Felix) also increments a global variable by 1 for each step.
This whole thing is repeated 500 times, giving a long enough time for the task to get a fair comparison. Shorter and the difference in speed would have been harder to measure. Longer and I would have fallen asleep.


Raspbian 2012-07-15 Image
Login was rejected a few times before I was allowed it. This is with the default username/password and using the same keyboard as for the 2013-05-25 image so it looks like some USB based issues were resolved since the 2012-07-15 image was released.
Scratch felt sluggish in loading and resizing the program to full screen
To keep it consistent I ran the program full screen. On the 2012-07-15 image full screen did not stretch but just put a 480 x 360 window in the middle of the screen
Test ran in 1m 22s


Raspbian 2013-05-25 Image
Login worked first time every time.
Scratch felt responsive in loading and resizing the program to full screen
Full Screen stretched to the resolution of the screen, so was true full screen experience.
You will see the updating of the Variable is not real time. It looks like variable updates on screen do not happen every time the variable is changed.
Test ran in 0m 51s 
37% faster than the 2012-07-15
An amazing increase in performance purely based on a software update

Raspbian 2013-05-25 Image Turbo Mode (1GHz)
I used raspi-conf to set the the Raspberry Pi to Turbo Mode to see what the maximum performance is.
Login worked first time every time.
Scratch felt really responsive in loading and resizing the program to full screen
Full Screen stretched to the resolution of the screen, so was true full screen experience.

You will see the updating of the Variable is not real time. It looks like variable updates on screen do not happen every time the variable is changed.

Test ran in 0m 33s 
60% faster than the 2012-07-15 (non-Turbo)
35% faster than 2013-05-25 (non-Turbo)

Compared to stock 2012-07-15 image the new 2013-05-25 image with Turbo mode set is nearly 3 times faster in Scratch.
All without a hardware upgrade and with user changeable settings.

The only limitation appears to be the speed at which variable are updated on the screen. The variables are updated in the background it is purely the screen update that is slow.

For most thing I'd expect the variable issue will not be a problem so a fantastic result.

Scratch is now definitely usable on the Raspberry Pi.

No comments:

Post a Comment