Loading ...
Sorry, an error occurred while loading the content.

Re: JSON.parse

Expand Messages
  • Douglas Crockford
    ... There was an n**2 problem with the regexp. The latest version of json.js should be much happier with large texts.
    Message 1 of 7 , Jan 21, 2006
    View Source
    • 0 Attachment
      > A test string of about 11,000 bytes brings my 3.2GHz P4 to it's knees,
      > for longer than I'm prepared to wait (> 5mins).
      >
      > After a bit of investigation, the problem seems to rest solely with
      > the RegExp check; if this is removed, and the function sublty rejigged
      > accordingly, the parse phase executes instantly and the resultant
      > object is exactly what I would expect.

      There was an n**2 problem with the regexp. The latest version of
      json.js should be much happier with large texts.
    Your message has been successfully submitted and would be delivered to recipients shortly.