I have been working on other features, but I would guess that IF
strings are COW then when I replaced the strings in metadata with char
* in HashStore, THEN strings NOT in metadata could no longer refer to
Metadata and had to start making a private copy of the data.  For
instance the multimap<string,string> for guid to url.

So my patch might have made some things better and other things worse.
A more complete patch may be needed to actually get any noticeable
benefit.

But the truth is that I do not understand what is going on.


On Tue, Oct 03, 2000 at 09:10:22AM -0700, Mark B. Elrod wrote:
> so i whipped up a quick test program that created 100000 string objects
> and assigned them the same literal value... used about 15 megs of
> memory. also tried assigning them the same string value as in:
> 
> string foo = "Hello, this is a test of the string memory management in
> the STL.";
> 
> for(int i = 0; i < 100000; i++)
>  {
>   string* s = new string;
> 
>   *s = foo;
>  }
> 
> this also took about 15 megs...
> 
> so this begs the question of why the memory patch by chris made such
> little difference. I would expect for a large catalog that it would
> really make a difference.
> 
> elrod
> 
> 
> _______________________________________________
> [EMAIL PROTECTED]
> http://www.freeamp.org/mailman/listinfo/freeamp-dev
_______________________________________________
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev

Reply via email to