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

Jason Stubbs wrote:
> On Saturday 17 September 2005 01:59, Paul Varner wrote:
> 
>>http://bugs.gentoo.org/show_bug.cgi?id=90680
>>
>>Author: Paul Varner
>>
>>The current implementation of gentoolkit creates a portage.config object
>>for every package object that it creates. While this is the correct
>>thing to do from an object-oriented programming point of view, this
>>implementation consumes an excessive amount of memory and CPU.  The
>>proposed patch changes the portage.config object for each package object
>>to point to a single global object.
>>
>>If no one sees any serious issues with the patch, I will be placing it
>>into gentoolkit.
> 
> 
> I tried doing this once before locally, but found some issue with it. 
> Unfortunately, I can't remember what that issue was. If you are calling 
> setcpv() for every call to the package object that utilizes the config 
> object and no utilizing packages (in gentoolkit or otherwise) are utilizing 
> threading, it should theoretically be okay. Actually, I think it was the 
> threading issue that delayed the fix.
> 

I can't remember the model for this, but there is some logic along the
lines of intercepting config object writes with setattr and then cloning
the config object.  That way if the config is read-only only 1 is
instantiated, but if you attempt to modify it, the config would clone
itself, then proceed with the modification and return the cloned copy.
Not sure how easy that would be to implement, perhaps some sort of
wrapper class?

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

iQIVAwUBQytkOmzglR5RwbyYAQKDvw//Wz/TpPF35sf+yhz5dyQ09qN5Ug9qiTec
qDnf364k+lzUSXzzNEjhpgSpyyKcEv30CjZWTn+g3IoH7aQ2v2mIIF+5V0C/9kxP
JH0a+ibh+Mvzv28tteEE+VX4yTykNz8L5b6twwQO/53GfY8Dj/l19AqOrjgHOfGf
/nvslpqEiFmAzc0RdxMuOAiFHdcfZgZyQpHsHboTZ7kQQpFTX4h1nShNAkGiceBI
ucfIs/Fp0RunDUYK2pfIedbLKsfRKyySaUOXXPUrTiwufO7zbyvRZI/+mBLJlL6v
Ud49wak10G8dFNZA9J3LgWRoy2Dqxrp6Eu7gTp5U4ONKLSJo3CSVa+1P2eACmerl
RqlAaVxtz+lpaXoiTSNoFKzjrIgidT00d7kG0v/gbI0vsqVy31nEuaSqWgAwjBit
GeDV8A9Tnxe+UNyUkd4BpBX3p8bX4EyDUNqfv0OChuCXbozbc1yizksSps8+Y3iQ
uG29o90/ExvsRQVAFKhWBjc9aYgghMhTO8yrKGkp4eI+ewa82QhLnlhgdQRMLSqY
ox+IRPxClIVRLzUZ4m3BsITy3QdSqvVhrB7ITofIFjXSY0OPQivA0HSebnPDptlU
mPreE6NzWs7KGhjhBvatqKnM7CuzW9JogolXkk+vT/pvSWlAoPc48mAW77CmKO5G
q3754DSKb3A=
=uzjq
-----END PGP SIGNATURE-----
-- 
gentoo-portage-dev@gentoo.org mailing list

Reply via email to