package: ucf
version: 3.005
severity: wishlist

When using ucf to manage large numbers of files, I've noticed pauses while the maintainer script is calling ucf in a loop. I am uncertain as to what this slowdown is, whether is it ucf startup overhead, or some other overhead.

For comparison, most conffiles are still managed by dpkg, but I don't notice slowdowns there.

I'm guessing that this could be allevieated by having a multi-file dispatch call into ucf; ucf would then loop over each file, figuring out which state change is needed for each, store this internally, then do a series of debconf questions based on the data it found. But that's just a guess.

Attached is the irc log where I discussed this with you.

06:24:08 PM < eigood > Manoj: please do, it's too slow
06:24:17 PM <  Manoj > I really did not think there was data that justified 
optimization -- and I strongl believe in 
                       not optimizing early
06:24:43 PM <  Manoj > eigood: really? You care about how long it takes ucf to 
ask you a question?
06:24:55 PM < eigood > Manoj: I care when there are 100+ files to ask
06:25:01 PM <  Manoj > how much of that is debconf starting up?
06:25:16 PM < eigood > once for each file?  quite a bit
06:25:31 PM < eigood > if you had it as a single program, that gathered all the 
data about all the 100+ files, then it 
                       wouldn't be so bad
06:25:42 PM < eigood > you might even do a multi-file version in shell
06:25:46 PM <  Manoj > I'll still have to use debconf, and since debconf only 
allows asking one question anyway, I  
                       think even a C implementation will have most of the 
speed issues
06:25:56 PM < eigood > it certainly does not
06:26:03 PM < eigood > you can ask tons of questions in debconf 
06:26:50 PM <  Manoj > eigood: well, a shell muti-file question should be tested
06:27:21 PM < eigood > I have no problem asking one question for each file; 
generally, the questions wouldn't be asked,  
                       so you'd never even send debconf a "DISPLAY QUESTION" 
comman
06:27:22 PM < eigood > +d
06:27:28 PM <  Manoj > I always meant to look at how apache module questions 
are asked (they have a checkbox per 
                       module, iirc)
06:27:54 PM < weasel > I hate the ca-cert questions
06:27:54 PM < eigood > my issue is the looping in the maintainer script, 
calling ucf multiple times
06:28:03 PM < weasel > it's painful to de-select them all
06:28:35 PM <  Manoj > eigood: I'll happily add the ability of giving ucf 
multiple files, and have it ask one question 
                       using checkboxes, but at this moment I do not know the 
debconf calls I'll need to make
06:28:46 PM < eigood > why use checkboxes?
06:28:59 PM < eigood > for each file that needs to have changes 
merged/prompted, ask a question 
06:29:08 PM <  Manoj > well, what if I swant to replace some files, look at 
other files, and not replace others?
06:29:18 PM < eigood > look at how dbconfig-common does it, creating a new 
question on the fly from a template 
06:29:33 PM < eigood > so ask a question for each of those
06:29:42 PM <  Manoj > eigood:  so how is there a speed increase, if I still 
ask N questions? 
06:29:57 PM < eigood > because ucf is not called multiple times, and ucf's 
startup overhead is reduced 
06:30:09 PM < eigood > my problems with the speed are not with the number of 
questions asked
06:30:11 PM <  Manoj > eigood: Umm. 
06:30:30 PM < eigood > in most cases, most questions won't be shown, ever; 
config files are not being changed with each  
                       new package release

Reply via email to