Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Large XML and "script stack space quota is exhausted" in FF3

    Hi,
    I try to load a TreeGrid with a Datasource via a not so small xml File (8000 records)
    In FF3 I get a "script stack space quota is exhausted" error and all processing stops (IE7 works). I found this is due to https://bugzilla.mozilla.org/show_bug.cgi?id=420869.
    The processing stops in ISC_DataBinding.js at
    var _2=_1.match(new RegExp("^\\s*<\\?.*\\?>"));
    Is it possible to cut the first processing instruction with something else then a Regular Expression?

    #2
    Maybe this thread belongs to SmartClient Technical Q&A Forum. Can the moderator move it there or should I repost it there (or is it okay here)?

    Comment


      #3
      Hi hscmitt,

      Good job tracking this to a Firefox bug. It looks like you could avoid this problem if you omit the <?xml directive from your response entirely. Are you able to do that, and can you confirm that this works?

      Alternatively, if you're willing to try making some code changes, it should be possible to rewrite this regexp so that it's based on indexOf() checks instead, and submit a patch. In the source, this is in XMLTools.js, trimXMLStart()

      Comment


        #4
        Originally posted by Isomorphic
        Hi hscmitt,

        Good job tracking this to a Firefox bug.
        I think it is a known Firefox limitation and it won't go away...
        Originally posted by Isomorphic
        It looks like you could avoid this problem if you omit the <?xml directive from your response entirely. Are you able to do that, and can you confirm that this works?
        It works. Thanks for this idea. Probably too obvious to see it :)
        Originally posted by Isomorphic
        Alternatively, if you're willing to try making some code changes, it should be possible to rewrite this regexp so that it's based on indexOf() checks instead, and submit a patch. In the source, this is in XMLTools.js, trimXMLStart()
        Sorry, I don't touch javascript if I can avoid it. But my idea would be:
        Code:
        if(!isFirefox())
            cutXMLDirective
        else
            keepIt
        Because - I think - Firefox has no problem with the xml directive.

        Comment


          #5
          If you're not willing to attempt a patch, can you at least .zip the file you use for testing (including a working DataSource definition that demonstrates the problem) and email it to support@isomorphic.com? This will allow us to reproduce and fix the problem more easily.

          Comment


            #6
            Changing:
            {var _2=_1.match(new RegExp("^\\s*<\\?.*\\?>"));if(_2){_1=_1.substring(_2[0].length)}}
            to:
            {var _2=_1.match(new RegExp("^\\s*<\\?[^?]*\\?>"));if(_2){_1=_1.substring(_2[0].length)}}
            appears to solve the problem.

            Comment


              #7
              Thanks for taking the time to put this together. We'll be making this change in 7.0 final

              Comment

              Working...
              X