On Mon, 2008-08-25 at 09:15 +0200, Tim Lauridsen wrote:
> nope, it don't handle [sections] and it can't write stuff back to disk.
> it can only do
> # Comment
> option = value # comment
>
> into {'option' : value}
>
> not a full blown ConfigParser replacement like python-iniparse. The idea
> behind the introduction parse inparse was to be able to write back the
> ini file to disk without losing any formatting and comments. I think
> that James comments about making iniparse faster was a kind of a joke or
> else i has to ask upstream to recode it in assembler :)
Nah, as with most things, I figure some tracing should provide one or
two hotspots. From my really quick look last week one of the hotspots
seemed to be:
_line_types = [EmptyLine, CommentLine,
SectionLine, OptionLine,
ContinuationLine]
def _parse(self, line):
for linetype in self._line_types:
lineobj = linetype.parse(line)
...which is called for each line. But maybe that can't go any faster
without losing features ... and it won't be the end of the world if it
takes all of ~0.5 of a second to run yum commands :).
--
James Antill <[EMAIL PROTECTED]>
Fedora
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel