1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Jason Stubbs wrote: |
5 |
> On Saturday 17 September 2005 01:59, Paul Varner wrote: |
6 |
> |
7 |
>>http://bugs.gentoo.org/show_bug.cgi?id=90680 |
8 |
>> |
9 |
>>Author: Paul Varner |
10 |
>> |
11 |
>>The current implementation of gentoolkit creates a portage.config object |
12 |
>>for every package object that it creates. While this is the correct |
13 |
>>thing to do from an object-oriented programming point of view, this |
14 |
>>implementation consumes an excessive amount of memory and CPU. The |
15 |
>>proposed patch changes the portage.config object for each package object |
16 |
>>to point to a single global object. |
17 |
>> |
18 |
>>If no one sees any serious issues with the patch, I will be placing it |
19 |
>>into gentoolkit. |
20 |
> |
21 |
> |
22 |
> I tried doing this once before locally, but found some issue with it. |
23 |
> Unfortunately, I can't remember what that issue was. If you are calling |
24 |
> setcpv() for every call to the package object that utilizes the config |
25 |
> object and no utilizing packages (in gentoolkit or otherwise) are utilizing |
26 |
> threading, it should theoretically be okay. Actually, I think it was the |
27 |
> threading issue that delayed the fix. |
28 |
> |
29 |
|
30 |
I can't remember the model for this, but there is some logic along the |
31 |
lines of intercepting config object writes with setattr and then cloning |
32 |
the config object. That way if the config is read-only only 1 is |
33 |
instantiated, but if you attempt to modify it, the config would clone |
34 |
itself, then proceed with the modification and return the cloned copy. |
35 |
Not sure how easy that would be to implement, perhaps some sort of |
36 |
wrapper class? |
37 |
|
38 |
-----BEGIN PGP SIGNATURE----- |
39 |
Version: GnuPG v1.4.1 (GNU/Linux) |
40 |
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org |
41 |
|
42 |
iQIVAwUBQytkOmzglR5RwbyYAQKDvw//Wz/TpPF35sf+yhz5dyQ09qN5Ug9qiTec |
43 |
qDnf364k+lzUSXzzNEjhpgSpyyKcEv30CjZWTn+g3IoH7aQ2v2mIIF+5V0C/9kxP |
44 |
JH0a+ibh+Mvzv28tteEE+VX4yTykNz8L5b6twwQO/53GfY8Dj/l19AqOrjgHOfGf |
45 |
/nvslpqEiFmAzc0RdxMuOAiFHdcfZgZyQpHsHboTZ7kQQpFTX4h1nShNAkGiceBI |
46 |
ucfIs/Fp0RunDUYK2pfIedbLKsfRKyySaUOXXPUrTiwufO7zbyvRZI/+mBLJlL6v |
47 |
Ud49wak10G8dFNZA9J3LgWRoy2Dqxrp6Eu7gTp5U4ONKLSJo3CSVa+1P2eACmerl |
48 |
RqlAaVxtz+lpaXoiTSNoFKzjrIgidT00d7kG0v/gbI0vsqVy31nEuaSqWgAwjBit |
49 |
GeDV8A9Tnxe+UNyUkd4BpBX3p8bX4EyDUNqfv0OChuCXbozbc1yizksSps8+Y3iQ |
50 |
uG29o90/ExvsRQVAFKhWBjc9aYgghMhTO8yrKGkp4eI+ewa82QhLnlhgdQRMLSqY |
51 |
ox+IRPxClIVRLzUZ4m3BsITy3QdSqvVhrB7ITofIFjXSY0OPQivA0HSebnPDptlU |
52 |
mPreE6NzWs7KGhjhBvatqKnM7CuzW9JogolXkk+vT/pvSWlAoPc48mAW77CmKO5G |
53 |
q3754DSKb3A= |
54 |
=uzjq |
55 |
-----END PGP SIGNATURE----- |
56 |
-- |
57 |
gentoo-portage-dev@g.o mailing list |