[Yum-devel] speeding up yum was Re: [Bug 207] yumError.py patch submissio

Michael Stenner mstenner at linux.duke.edu
Thu Feb 26 15:53:28 UTC 2004


On Thu, Feb 26, 2004 at 09:40:37AM -0600, David Farning wrote:
> On Mon, 2004-02-23 at 10:42 -0700, Michael Stenner wrote:  
> > As someone who does know C, let me say that I think it would be a
> > terrible idea to write this in C. 
> 
> I am not sold that it is a terrible idea-- personally, the jury is still
> out on if it just a bad idea;).

I'm OK with that :)

> Ironically, some of the code is cleaner using clearly defined
> structures.  It helps clean up the [{(),([])}} type stuff yum has.
> But, I fully agree using python lists are much clearer building
> dynamic arrays or balanced trees while worrying about mallocs and
> frees;)

I have found very very few cases where something can be written more
cleanly in C than it _can_ be written in python.  It's not fair to
compare a tidy C implementation and an ugly python implementation.  If
there are bits you want to tidy up a bit, that's fine, but it can
probably be done in python.

> > I would love to get the benefits of C here (speed is the only one I
> > can think of really), but I don't think it's worth the sizable costs.
> 
> The bottlenecks that I found are:
> 
> download header.info --pretty short delay consider fixing by threading
> or determining that the best header is already present.

The threading (or forking) idea is coming up a lot lately, so I'm
beginning to consider it more seriously.  However, I don't understand
how threading would help in this case.  It's a single file.  Can you
explain what you mean a bit more?

I agree that some timestamp-checking may be worthwhile.  Don't know if
MD stuff makes this moot.

> download header -- oui, worked on in the metadata stuff.
> verifying headers -- pretty short worked on in md

I'll refrain from comment on the ts stuff, 'cause I don't know jack
about that.

					-Michael
-- 
  Michael D. Stenner                            mstenner at ece.arizona.edu
  ECE Department, the University of Arizona                 520-626-1619
  1230 E. Speedway Blvd., Tucson, AZ 85721-0104                 ECE 524G



More information about the Yum-devel mailing list