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

PBKResearch peter at pbkresearch.co.uk
Tue Jan 19 06:29:35 EST 2016



Very interesting. It would be more interesting if you could save your test image as a .png file, and then include reading with PNGReadWriter in your comparison. This would help to confirm or refute the original point made by Dimitris, that reading from .png is particularly slow.


Peter Kenny


From: Pharo-users [mailto:pharo-users-bounces at lists.pharo.org] On Behalf Of Denis Kudriashov
Sent: 19 January 2016 10:59
To: Any question about pharo is welcome <pharo-users at lists.pharo.org>
Subject: Re: [Pharo-users] Creation form from PNG file very slow on Pharo 4 and 5



2016-01-19 11:34 GMT+01:00 Dimitris Chloupis <kilon.alios at gmail.com <mailto: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/5957a8bc/attachment.html>

More information about the Pharo-users mailing list