[Etoys] etoys performance problems

Yoshiki Ohshima yoshiki at vpri.org
Fri Apr 4 20:55:23 EDT 2008


  Hello,

  I published a few changes in last a couple of weeks; I just looked
at some inefficiency and avoid them.

  I compared the project loading time in Etoys 2.3 (before Luke's method
dictionary patch) and Etoys 3.0 #1957.  I loaded all projects in the
ExampleEtoys like this:

-------------------
| dir entries proj |
dir _ FileDirectory on: '/usr/share/etoys/ExampleEtoys'.
entries _ FileList2 projectOnlySelectionMethod: dir entries.
entries _ entries collect: [:each | Project parseProjectFileName: each first].
entries do: [:each |
	Transcript show: '\classic: ' withCRs , each first, ' ', ([ProjectLoading loadFromDir: '/usr/share/etoys/ExampleEtoys' projectName: each first] timeToRun) printString.
	proj _ (Project named: each first).
	proj ifNotNil: [proj okToChangeSilently].
].
-------------------

got result (numbers are in milliseconds and are the average of three
runs):

BallDropAnalysis1	13850.3		9971		1.38906
BetterMovieUI		9662.67		6145		1.57244
BouncingBallAnimation	4825.33		3151.67		1.53104
CarAndPen		5676.33		3504.67		1.61965
ComputerLogicGame	14902.7		7080.33		2.1048
DemonCastle1		24442.7		11497.7		2.12588
EtoysChallenge		19955.7		10435.7		1.91226
FishAndPlankton		12526		9573.33		1.30843
FollowRoad		5532.33		3869.33		1.42979
JustPaintedCar		3777		2237		1.68842
LunarLanderGame		7730		5286.67		1.46217
MakeAMovie		8909.67		5718		1.55818
MiddleOfRoad		6056		3554		1.704
ParticlesDyeInWater	11483.3		5672.33		2.02445
ParticlesEpidemic	9368.67		5116.33		1.83113
ParticlesGasModel	10688		4668.67		2.2893
RandomRacing		7013.33		4263.33		1.64504
SalmonSniff		5943		3912.33		1.51904
SimpleSprings		5563		4566.67		1.21818
SpeedAcceleration	6150.67		4421.33		1.39113
StartOfDTPDocument	4577.67		3090.67		1.48113
SteeringTheCar		6285.67		4388.67		1.43225
TurtleGeometry		6117.67		3903.33		1.56729
Welcome			22904		11830.3		1.93604

  I haven't done anything about the double compression problem,
putting media file aside, nor looking at the saving side.  But now
project loading is 20%-100% faster than before, and bigger projects
seem to benefit more.

  I have been experimenting another new format in S-expression, but
found that for bigger projects, the new format is much slower.  Unless
there is a way to optimize it, or some other reason, probably we stick
with the old format for now...

  I'll try to modify the code so that .pr file may not have to be
compressed and see if how much we gain.

-- Yoshiki


More information about the Etoys mailing list