in reply to tuning hash memory usage

Perhaps you could change the internal representation of a Content object so that it is initially a two-element array, and only becomes a hash when it has two or more dependencies.

This would require adding code to the Content class, but if your encapsulation is properly done, no other part of the program will need to know about the change.

Replies are listed 'Best First'.
Re: Re: tuning hash memory usage
by jmason (Novice) on Nov 21, 2000 at 23:44 UTC
    A good trick! I'll try it out. If that doesn't help I might just marshal some of the hashed data into a string and see if that helps ;)