Something crazy happened to YAML parsing in 1.6.3

Showing 1-2 of 2 messages
Something crazy happened to YAML parsing in 1.6.3 Nikolaj 3/16/12 8:44 AM
I upgraded my SDK to 1.6.3 and noticed my test suite was running
really slow (nosegae with gaetestbed).

I fired up the profiler and found a LOT of YAML calls. Note that I do
not use YAML in my application, this has to be purely the SDK's
processing of the app configuration.

Here is some example profile output on each version:

1.6.3:
   ncalls  tottime  percall  cumtime  percall
filename:lineno(function)
    18689    0.277    0.000   18.589    0.001 c:\google_appengine
\google\appengine\api\yaml_listener.py:179(_GenerateEventParameters)
    18689    0.293    0.000   18.179    0.001 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:91(check_event)
   116353    1.696    0.000   14.103    0.000 c:\google_appengine\lib
\yaml\lib\yaml\scanner.py:113(check_token)
    18439    0.741    0.000    8.938    0.000 c:\google_appengine\lib
\yaml\lib\yaml\scanner.py:153(fetch_more_tokens)
     5256    0.159    0.000    6.482    0.001 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:443(parse_block_mapping_value)
     8819    0.276    0.000    5.715    0.001 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:424(parse_block_mapping_key)
     4410    0.126    0.000    5.408    0.001 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:399(parse_indentless_sequence_entry)
    14064    0.868    0.000    5.196    0.000 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:270(parse_node)
   185104    2.953    0.000    4.792    0.000 c:\google_appengine\lib
\yaml\lib\yaml\scanner.py:142(need_more_tokens)
     9620    0.178    0.000    4.590    0.000 c:\google_appengine\lib
\yaml\lib\yaml\scanner.py:668(fetch_plain)
     9620    1.081    0.000    3.998    0.000 c:\google_appengine\lib
\yaml\lib\yaml\scanner.py:1275(scan_plain)
    10501    0.117    0.000    3.645    0.000 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:267(parse_block_node_or_indentless_sequence)
    18655    0.235    0.000    3.152    0.000 c:\google_appengine
\google\appengine\api\yaml_listener.py:142(HandleEvent)
     3563    0.056    0.000    1.989    0.001 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:419(parse_block_mapping_first_key)
     3563    0.035    0.000    1.702    0.000 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:261(parse_block_node)
     9631    0.270    0.000    1.497    0.000 c:\google_appengine
\google\appengine\api\yaml_builder.py:347(Scalar)
   255526    1.430    0.000    1.430    0.000 c:\google_appengine\lib
\yaml\lib\yaml\reader.py:122(peek)
    14075    0.178    0.000    1.394    0.000 c:\google_appengine
\google\appengine\api\yaml_builder.py:249(_HandleValue)

1.6.2:
   ncalls  tottime  percall  cumtime  percall
filename:lineno(function)
       88    0.001    0.000    0.099    0.001 c:\google_appengine
\google\appengine\api\yaml_listener.py:179(_GenerateEventParameters)
       88    0.002    0.000    0.097    0.001 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:91(check_event)
      556    0.008    0.000    0.077    0.000 c:\google_appengine\lib
\yaml\lib\yaml\scanner.py:113(check_token)
      102    0.004    0.000    0.053    0.001 c:\google_appengine\lib
\yaml\lib\yaml\scanner.py:153(fetch_more_tokens)
       31    0.001    0.000    0.035    0.001 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:443(parse_block_mapping_value)
       41    0.001    0.000    0.044    0.001 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:424(parse_block_mapping_key)
       10    0.000    0.000    0.014    0.001 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:399(parse_indentless_sequence_entry)
       72    0.005    0.000    0.026    0.000 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:270(parse_node)
      898    0.014    0.000    0.022    0.000 c:\google_appengine\lib
\yaml\lib\yaml\scanner.py:142(need_more_tokens)
       61    0.001    0.000    0.028    0.000 c:\google_appengine\lib
\yaml\lib\yaml\scanner.py:668(fetch_plain)
       61    0.006    0.000    0.025    0.000 c:\google_appengine\lib
\yaml\lib\yaml\scanner.py:1275(scan_plain)
       62    0.001    0.000    0.021    0.000 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:267(parse_block_node_or_indentless_sequence)
       87    0.001    0.000    0.023    0.000 c:\google_appengine
\google\appengine\api\yaml_listener.py:142(HandleEvent)
       10    0.000    0.000    0.006    0.001 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:419(parse_block_mapping_first_key)
       10    0.000    0.000    0.005    0.000 c:\google_appengine\lib
\yaml\lib\yaml\parser.py:261(parse_block_node)
       61    0.002    0.000    0.012    0.000 c:\google_appengine
\google\appengine\api\yaml_builder.py:347(Scalar)
     1646    0.009    0.000    0.009    0.000 c:\google_appengine\lib
\yaml\lib\yaml\reader.py:122(peek)
       72    0.001    0.000    0.011    0.000 c:\google_appengine
\google\appengine\api\yaml_builder.py:249(_HandleValue)

The performance of the development server does not seem particularly
degraded, although issue #7031 looks mildly related.

Has anybody else experienced something similar? Would love to get some
insight on this and hopefully a fix can be made for the next release.
Re: [appengine-python] Something crazy happened to YAML parsing in 1.6.3 Robert Schuppenies 3/19/12 9:33 AM
I haven't noticed it, but if you think it is a regression, could you file an issue?: http://code.google.com/p/googleappengine/issues/entry

/robert


--
You received this message because you are subscribed to the Google Groups "google-appengine-python" group.
To post to this group, send email to google-appe...@googlegroups.com.
To unsubscribe from this group, send email to google-appengine-python+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine-python?hl=en.