[Pharo-users] Creation form from PNG file very slow on Pharo 4 and 5

Denis Kudriashov dionisiydk at gmail.com
Tue Jan 19 05:59:26 EST 2016


2016-01-19 11:34 GMT+01:00 Dimitris Chloupis <kilon.alios at gmail.com>:

> most likely fuel, since it stores your live object as is.
>
> I like fuel but the fact that I may be limited by incompatible versions is
> a game stopper for me. I am ok with new version between incompatible with
> old one but there must be some backward compatibility to any format I use.
> Or else I end up worrying about things I should not be worrying about.


You are right. I perform little experiment. Fuel reading is 60% faster than
BMP:

Smalltalk garbageCollect; garbageCollect.
r1 := [FileLocator imageDirectory / 'test.bmp' readStreamDo: [ :s |
s binary.
fromBMP := BMPReadWriter formFromStream: s]] benchFor: 2 seconds.

Smalltalk garbageCollect; garbageCollect.
r2:=[FileLocator imageDirectory / 'test.fuel' readStreamDo: [ :s |
s binary.
fromFuel := (FLMaterializer newDefault materializeFrom: s) root]] benchFor:
2 seconds.

{ r1. r2 } "an Array(a BenchmarkResult(2,199 iterations in 2 seconds 2
milliseconds. 1,098 per second) a BenchmarkResult(5,728 iterations in 2
seconds 3 milliseconds. 2,860 per second))"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160119/11f9da8d/attachment.html>


More information about the Pharo-users mailing list