Gentoo Archives: gentoo-portage-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] PATCH: gentoolkit: Make portage.config object a global object
Date: Fri, 16 Sep 2005 23:09:39
In Reply to: [gentoo-portage-dev] PATCH: gentoolkit: Make portage.config object a global object by Paul Varner
1 On Saturday 17 September 2005 01:59, Paul Varner wrote:
2 >
3 >
4 > Author: Paul Varner
5 >
6 > The current implementation of gentoolkit creates a portage.config object
7 > for every package object that it creates. While this is the correct
8 > thing to do from an object-oriented programming point of view, this
9 > implementation consumes an excessive amount of memory and CPU. The
10 > proposed patch changes the portage.config object for each package object
11 > to point to a single global object.
12 >
13 > If no one sees any serious issues with the patch, I will be placing it
14 > into gentoolkit.
16 I tried doing this once before locally, but found some issue with it.
17 Unfortunately, I can't remember what that issue was. If you are calling
18 setcpv() for every call to the package object that utilizes the config
19 object and no utilizing packages (in gentoolkit or otherwise) are utilizing
20 threading, it should theoretically be okay. Actually, I think it was the
21 threading issue that delayed the fix.
23 --
24 Jason Stubbs