Duration class>>#readFrom: is SURPRISING [was EndOfStream performance cost]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Duration class>>#readFrom: is SURPRISING [was EndOfStream performance cost]

Nicolas Cellier-3
While chasing stream pastEnd readers, I ran all 7141 tests and got only
340 pastEnd reads, and still no failure (except known ones in this
image), no image crash, not the smell of a bug yet (I know, test
coverage is quite thin...).

However, seeing Duration class>>#readFrom: among pastEnd readers, i
inquired implementation and soon noticed a surprising result:
http://bugs.squeak.org/view.php?id=6764

Reading pastEnd and testing isNil is absolutely legitimate here, I do
not propose to change it per se.
But I would like this readFrom: behaviour changed, wouldn't you?

At least hope my EndOfStream inquiry won't be totally useless...

Cheers