PBMCube / as3yaml

Automatically exported from code.google.com/p/as3yaml
0 stars 0 forks source link

Slow parsing, and one performance suggestion. #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Parse YAML below
2. Takes much longer than expected (10 seconds, expecting something much
faster!)
3. Output is correct, performance is unexpected.

I have YAML that looks like the text I at the end of this email.  I
only included 3 elements in the array, but the tests I've been running
have about 50-70.  If this text is stored in a string called "response",
the following line:

   var h:HashMap = YAML.decode(response) as HashMap;

Takes about 10 seconds to execute.  

Is there something we can do to improve this?  This seems like a long
time for a few objects.  

--- 
jobs: 
  - 
    dispatch: getID
    host: thisIsMyHost
    jid: 0a8d79f7-561a-4cae-a109-f37a79ecfbb8-d8e94550
    jobStatus: 
      done: "Time= Thu May 15 10:03:24 EDT 2008"
    user: production account
  - 
    dispatch: getID
    host: thisIsMyHost
    jid: 15a6fd65-887e-43d5-a7cd-6f513a71af1a-d8e94569
    jobStatus: 
      done: "Time= Thu May 15 08:55:32 EDT 2008"
    user: production account
  - 
    dispatch: getID
    host: thisIsMyHost
    jid: c4f74ed6-3f53-4976-abda-9ae5d86e7a64-d8e9456a
    jobStatus: 
      done: "Time= Thu May 15 08:55:38 EDT 2008"
    user: production account
  - 

Original issue reported on code.google.com by nabeel.a...@gmail.com on 18 May 2008 at 3:34

GoogleCodeExporter commented 9 years ago
Hi Nabeel,

Please download the latest version.  It is about 100x faster than the version 
that
you are using.

Please note that YAML.decode() now returns Dictionary objects where it used to 
return
HashMaps.

See: http://as3yaml.googlecode.com/svn/trunk/docs/org/as3yaml/YAML.html#decode()

Original comment by dwischu...@gmail.com on 18 May 2008 at 4:40