synaptic-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Synaptic-devel] Automatic Proxy setting


From: Panu Matilainen
Subject: Re: [Synaptic-devel] Automatic Proxy setting
Date: Fri, 23 Jul 2004 15:03:46 +0300 (EEST)

On Fri, 23 Jul 2004, Michael Vogt wrote:

> On Fri, Jul 23, 2004 at 01:53:40PM +0300, Panu Matilainen wrote:
> > On Fri, 23 Jul 2004, Michael Vogt wrote:
> > > On Mon, Jul 19, 2004 at 11:30:38AM +0200, Jaap Haitsma wrote:
> > > [..]
> > > Yes, good idea! Unfortunally it's still a bit tricky. gksu let's you
> > > start a new process as a different user, but you can't switch the user
> > > of the running process. So what we have to do is the following:
> > > 
> > > 1. Start synaptic as user, do not lock anything
> > > 2. When the user selects "apply", run gksu with 
> > >    "synaptic  --non-interactive --hide-main-window --set-selections"
> > > 3. This will start a new synaptic as root in non-interactive mode.
> > >    It will wait for all selections (those need to be feed by the parent
> > >    non-root synaptic) and then download and execute the changes. 
> > > 4. After root synaptic finished, signal non-root synaptic to reread
> > >    it's cache. 
> > 
> > Eek. That's going to blow the already largish memory requirements 
> > sky-high. 
> 
> I don't think it will blow it "sky-high" :) Linux has copy on write
> for memory pages, so most pages should be shared between both synaptic
> versions. But we'll only know for sure once we tried it :)
> 
> Is the memory usage really that high? Synaptic uses ~25-27MB at my
> system. I think that apt-rpm had a memory leak some time ago that made
> the memory usage explode (~100MB easily). But it was fixed a while
> ago. 

Hmm, maybe I jumped the gun a bit :) The memory consumption indeed *used*
to be rather huge but haven't really checked recently, probably it was
those memory leaks that caused much of it. Still, you're going to have to
have to cases of apt cache open simultaneously, opening of which isn't
exactly stellar in speed and can eat memory quite badly just within just
apt itself (but that could well be caused by rpmlib which isn't exactly
known for it's light memory footprint either, not so much apt/synaptic)

>  
> [..]
> > I suppose it's ok to have this new mode but PLEASE don't make it
> > mandatory. I'm certainly not willing to sacrifice dozens of megabytes
> > memory just for the convenience of getting proxy settings from users
> > setup.
> 
> No, this will not be the default. There will be dections for it at
> startup. And it's not just proxy settings :)
> 
> Having a user mode will also make the GUI consistent (think of
> themes), allow querry of the proxy and let normal users browse the
> package database. And (most importend!) it's nice to have(tm).

Ok, didn't think of themes and such at all. My bad :)
Having user-browsable synaptic is indeed nice, though that could rather 
easily be handled by just checking if we're running as root and then
- open the cache in nonlocking mode
- disable any action taking buttons (update and apply are all that's 
*really* needed I suppose)

I still think running two synaptics for these purposes sounds awfully 
heavy but .. like you said, will only know once we try it :) And no 
problem anyway as long as it's not mandatory to run it in the "user mode".

        - Panu -




reply via email to

[Prev in Thread] Current Thread [Next in Thread]