BitBlt >> #pixelAt:put: speed

Bob Arning arning at charm.net
Tue May 2 21:53:10 UTC 2000


Hi Richie,

On 2 May 2000 20:06:34 -0300 Gerardo Richarte <core.lists.squeak at core-sdi.com> wrote:

[html edited out for readability]

>I have a collection of 6000+ points, and I want to
>show it in a Morphic world...
>Let's say I&nbsp;need to draw every point, even
>when they overlap.
>Ok, I've done it, the point is that it's taking from
>1.5 to 3 seconds to draw it, and
>aprox. 80% of the time is consumed by BitBlt >> #pixelAt:put: according
>to MessageTally >> #spyOn:
Is there anything faster I can do? for example
>using Balloon somehow?

I suspect that either MessageTally is misleading you or you have an incredibly slow machine. Here is a simple test:

'From Squeak2.8alpha of 13 January 2000 [latest update: #2052] on 2 May 2000 at 5:46:11 pm'!

!BitBlt class methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2000 17:44'!
test1
"
BitBlt test1
"
	| f where what poker |
	f _ Form extent: 10 at 10 depth: 32.
	poker _ BitBlt bitPokerToForm: f.
	where _ 2 at 2.
	what _ 1.
	MessageTally spyOn: [6000 timesRepeat: [poker pixelAt: where put: what]].
! !

This puts 6000 pixels into a Form in 37 msec. It doesn't seem that there is a speed problem in #pixelAt:put:. How does your example differ from the above?

Cheers,
Bob





More information about the Squeak-dev mailing list