[gclist] The old container problem

Charles Fiterman cef@geodesic.com
Tue, 22 Sep 1998 11:13:02 -0500


At 11:55 AM 9/22/98 -0400, you wrote:

>My knee-jerk reaction to this is "oh dear, more knobs".  I've
>become very suspicious of knobs ever since working on compilers
>at Sun, where several more experienced people pointed out
>that adding one compiler option doubles the testing load, and
>more-or-less proved their point by provoking numerous bugs
>with randomly chosen compiler flags.  It's a safe bet that
>"if it isn't tested, it doesn't work", and adding knobs adds
>lots more stuff to test (10 knobs is a 1000x increase in
>the bug search space).

In general I agree about knobs but there are some circumstances where they work out well. The most common is exposing substrata objects.

Suppose you have an advanced windows system with slider bars etc. If you use it to implement a spread sheet system you will have such poor performance you will have garbage. But you can implement the advanced windows system on top of a bare bones windows system. Now if you expose the substrata, the bare bones windows system a spread sheet can be built efficiently on top of it. The alternative to this design pattern is either to re-implement bare bones windowing or to fine tune the application using arcane performance knowledge. Both are likely to be fragile. The windows designer has really succeeded in shifting his work into the customer's lap.

The testing for the bare bones system must be more exaustive since it will have more than one user but the advanced system built on top of it will benefit from that. There is more testing but its the difference between a product and a demonstration system.

Part of the generational collector substrata is something that puts an object at a generation. If we are adding an object to a collection and don't expect it deleted sooner than the collection it seems direct to have a way to put the object at the generation of the collection. In this case I doubt it buys enough to pay for the documentation but measurement could prove me wrong. You almost have to do it to do the measurment.

Making things like garbage collection efficient enough so people can use them freely is a power of ten harder than making them work as a class room exercise. Part of the difficulty is exposing parts of the substrata such as allowing people to invoke collection.