Comment 4 for bug 566940

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 566940] Re: Reducing peak memory for commit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/19/2010 08:27 PM, John A Meinel wrote:
> Robert Collins wrote:
>> I'd like to delete add_text completely, as previously mentioned - moving to
>> just a single way to add content to a repo, which will permit commit to a
>> stacked repo, and make it easier to be confident we've squelched all these
>> copy bugs.
>
>
> Sure, but you would retain the stack of FulltextContentFactory being
> passed to another function.
>
> And you can't pass an object to another one without a reference, and
> having a reference in the outer means it won't be released in the inner.

One way to do that is to pass in an iterable. If you pass in an
iterator of chunks, the outside doesn't have to hold a reference to the
actual text, and the inside can discard the chunks when it's done with them.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvWL3EACgkQ0F+nu1YWqI0PzACfQi1VE/5iQfS1JC3ixv+gCVgj
QC0An36E+DZiLRWclTzu0XBdDWAeamV/
=eSNk
-----END PGP SIGNATURE-----