[Valentina] M:M problems

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Jan 22 11:09:03 CST 2003


on 1/22/03 5:47 AM, Eric Forget at forgete at cafederic.com wrote:

>> Hmm, no idea.
>> 
>> Sources of AffraySet are open. Try go into GetCount and see what exactly
>> crashes...
> 
> Now I know. Sort() delete allSet which make it a weird API... That's why it
> crashes. For this API it may be too late (or for v2?) but you should avoid
> to hide those kind of "feature". If I wanted this feature I would have
> called the function SortAndDeleteSet() not Sort()... ;-)
> 
> As a rule of thumb, all implicit delete should be avoided. Even you, you've
> forgot it when you've read my code... ;-)

I see.

Agree that this looks problematic.

Reason, why I have made this, to save RAM.
Assume you have table 10M records.

Sort() algorithm create 2 tmp arrays it seems.
So you get pick at 120MB of RAM.

In the same time first array is not needed already.
So we can save 40BM of RAM.

Okay, agree that this must be made explicitly as additional parameter of
Sort()

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list