[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Draft PEP on RSON configuration file format

Kirill Simonov

3/2/2010 2:55:00 AM

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