[Yum-devel] metadata parser in C

Tambet Ingo tambet at ximian.com
Thu May 18 15:06:49 UTC 2006


Here's a new set of patches.

yum-metadata-parser.diff:
Changes for the metadata parser:
* Implement the database opening correctly, just like yum does.
* Implement raising the correct exception if something goes wrong.
* Some small performance optimizations: Don't copy uninteresting XML
characters to the local buffer, use typed python object initialization
functions instead of BuildValue(), and add a dedicated string chunk to
package ids collection instead of doing one malloc per id.
* I couldn't add it to the diff, but sqlitecache.py should be renamed to
sqlitecachec.py

So the current state with that is, logging is implemented, progressbar
is implemented, exception raising is implemented, so there shouldn't be
anything missing compared to the python version.

yum.diff, storagefactory.py
A diff against yum-2.6.1 to optionally use the fast C parser.
storagefactory.py goes to yum/yum directory. I re-factored the code a
bit so it wouldn't grow endlessly in the repo.py

With these patches, building the yum-metadata-parser and copying the
sqlitecachec.py file to $prefix/lib/python2.4/site-packages/yum/ will
make yum use the fast parser. If it's not there, it falls back to
sqlitecache and pickle implementations.

Tambet
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-metadata-parser.diff
Type: text/x-patch
Size: 50697 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20060518/a98d6ff2/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: storagefactory.py
Type: text/x-python
Size: 2880 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20060518/a98d6ff2/attachment.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum.diff
Type: text/x-patch
Size: 2811 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20060518/a98d6ff2/attachment-0001.bin 


More information about the Yum-devel mailing list