Draft PEP on RSON configuration file format

Kirill Simonov xi at gamma.dn.ua
Mon Mar 1 21:54:51 EST 2010


Patrick Maupin wrote:
> Kirill:
> 
> Thank you for your constructive criticism.  This is the gem that made
> it worthwhile to post my document.  I think all of your points are
> spot-on, and I will be fixing the documentation.

You are welcome.  Despite what others have been saying, I don't think 
this area is closed to innovations.


> I can well believe that the C implementation of YAML is much faster
> than the Python one, but I am aiming for something that will be
> reasonably quick in pure Python.  I will double-check the JSON C test
> results, but something I probably did not make clear is that the 22
> seconds is not spent parsing -- that is for the entire test, which
> involves reading restructured text and generating some 160 separate
> PDF files.

Yes, this makes more sense.  It's quite possible that the pure-Python 
PyYAML parser is much slower than the pure-Python JSON parser.

At the same time, semantically meaningful whitespaces will likely hinder 
the pure-Python performance.  To make it fast, you'll need to convert 
the inner loops of the parser to regexps, and it is hard to support 
variable-length indentation with static regular expressions.


Thanks,
Kirill



More information about the Python-list mailing list