Smalltalk & Squeak featured on Slashdot

Bijan Parsia bparsia at email.unc.edu
Thu Apr 26 05:03:25 UTC 2001


On Thu, 26 Apr 2001, Richard A. O'Keefe wrote:
[snip]
> Looking back through an old OOPSLA proceedings, I stumbled across a
> paper about Squeak.  The image back then was about 1MB.  Now it is about 9MB.

A shrinked image (with MVC and IDE) can prolly still come in under
1MB. With Morphic and a few other yummies you should be able to stay under
2.5 or so.

> It would be interesting to know roughly where the space is going.
> - IDE
> - Morphic
> - Scamper
> - Celeste
> - Balloon3D
> - Alice
> - Sound
> - Speech
>  - ...
> 
> Scamper is cute, but it feels even slower than HotJava (which is saying
> something) and I can't print from it, so *for me* it is bloat.

Hmm. I'm surprised at that. Scamper (for many things) is pretty nippy for
me. Two things which seem to get boggy are 1) downloading (and when this
gets bad, it's all bad ;)) and 2) scrolling really large pages (a know
problem with text morphs).

> Celeste is cool, but I continue to use /usr/bin/mailx as my mailer
> precisely because it *can't* do fancy things, and I had trouble hooking
> it into UNIX mail anyway, so *for me* it is bloat.

Well, it's "not used" :) Part of the problem with this is there are
"parts" of Celeste and Scamper, such as the URL classes or MailMessage,
that are things one most likely would like to have around. I.e., once you
get past the bits of these things that are really extentions of the core
system, what's left isn't (always) that huge.

But, of course, if you don't need them, you don't need them.
[snip]

But here's a tip to help figure some of this out. SystemDictionary has a
few useful space analysis tools in the miscellaneous protocol,
especially #spaceTally. From it's comment:

"Answer a collection of tuples representing the memory space (in
bytes) consumed by the code and instances of each class in the system. The
tuples have the form:
	<class> <code size> <instance count> <space for instances>
-----
(If you run this, be prepared for it to take a little while ;)

I ran this little do it on the result:

	self detect:[:i | i first name = #Scamper] 

and it gave me:

	#(Scamper 9631 0 0)

Which, of course, doesn't cover much of the scamper classes. So I ran
this:

| categories |
categories := #(#'Network-Url' #'Network-Web Browser' 
	#'Network-HTML Formatter' #'Network-HTML Forms' 
	#'Network-HTML Parser Entities'
	#'Network-HTML Parser' #'Network-HTML Tokenizer').
categories := self select: [:i | categories includes: i first category].
categories inject: 0 into: [:total :i | total + i second + i fourth] 

And got:
	71026

Changing the assignment:
	categories := #(#'Network-Mail Reader').
yields:
	55085

These are *not* the big sources of image growth :)

A slight modification:

| categories |
categories := self select: [:i | i first category
beginsWith: 'Balloon3D'].
categories inject: 0 into: [:total :i | total + i second + i fourth]

Yields:
	435885

Now, testing for beginsWith: 'Morphic' gets us:

	 3379693

Bloat at last!!!

But gee, to echo your point, Morphic is a *lot* of stuff. There's a PDA, a
bunch of games, a EPS outputter, a set of interface widgets (a lot of
which are in use in my system, since I'm running in morphic and have a
gazillion windows open, etc.).

Not to shabby for an experimental, unoptimized system.

(This is out of 13.6 MB image, which, obviously, has seen some use and has
a fair number of extras loaded.)

(Assuming I haven't blown the calcuation any :))

This is *not* to say that I won't be happy when Squeak gets a Smalltalk/X
like "load on demand" facility. Indeed, I'll be all the happier!

(FWIW, classes are generally cheap in Smalltalk. Just having more classes
isn't going to swell your system a lot. Ok ok, CompiledMethod leads the
space filling with an instances space size of 2228576, but that's with
*36496* instances!)

> Is _any_ Smalltalk dialect used for such
applications [i.e., shell scripts and cgis--ed]?  I suppose
> GNU Smalltalk or Budd's Little Smalltalk might be usable.

SmallScript is certainly targeted to those applications (among
others). Quick start up and dynamic loading are big features (it doesn't
store an image, but always reconstitutes one from files).

> Squeak is
>  - a multimedia library
>  - a compiler and development environment
> amongst other things. 
[snip]

And, really, at it's heart, a place to inhabit.

(And *no* you don't want to see my house :))

> I'm not sure that I *have* a position on the "is Squeak bloated" question.
> I can see value in having a smaller image; but everywhere I look I see
> systems that are _less_ useful to me taking _more_ memory.

Indeed! And worse, less *interesting*. All I can *ever* do with Acrobat is
crash my machine^H^H^H^H^H^H^H^H^H view and sometimes print a subset of
pdfs I encounter. I, personally, get some entertainment from browsing
around the system and playing around with morph toys.

However, I've advocated that just as we have a "tiny" image around, it
wouldn't hurt to have a few "midsized" images around. Perhaps as a first
step toward discovering some natural "break lines" in the system.

Cheers,
Bijan Parsia.





More information about the Squeak-dev mailing list