1

Bug with custom reports - Script pins my CPU (Read 532 times)

JoeO


    When I go to the reports page and try to create a custom graph, as soon as I hit that button to do so, Internet Explorer locks up and does not come back until it throws up that dialog we've all seen. The one that says, "The script on this page is causing Internet Explorer to run slowly. Do you want to stop the script?" (or something like that.). Can you take a look at that script and see if it is doing anything weird that might cause an infinite loop or something like that? I basically have to wait 30 seconds every time I want to do a custom graph. Incidentally I'm working on a crazy fast machine with a relatively recent installation. There's not a lot of junk in my system and that script is just about the only one that does this to me.. Microsoft Windows XP Version 5.1 (Build 2600) -- In other words Windows XP Service Pack 2 with all patches since then Internet Explorer Version 7.0.5730.11 Computer is HP Xw4400 with a raid array
    eric :)


      Hi Joe, Do you by any chance use IE 6? I enabled compression of the RA pages to conserve bandwidth. There's a known bug with IE 6 that chokes on compressed javascripts. I have a workaround that conditionally disables compression but apparently missed some. I'll have it fixed tonight. If possible, you should upgrade to IE 7 or FF 3. eric :-)
      eric :)


        Hi Joe, I put in a change to work around IE6's bug. Let me know if you're still having problems.
        JoeO


          Hi Eric, No I am using IE7. Unfortunately it is still happening today. I even deleted all my temporary internet files (in case the page was cached) but it still happens. Note that once I click "Yes" to stop the script, I end up on the custom graph page and can proceed normally. It's just that for 30+ seconds, Internet Explorer is completely locked up. I just tried it on FireFox and it does not happen there with the same machine. (Note - the specific version of IE is listed at the very end of my first post, in case the exact build number matters)
          eric :)


            Hi Joe, I'm not aware of any Javascript issues with IE 7, not that it means the problem doesn't exist. I need to set up a machine with XP and IE 7 to see if I can replicate the problem. Have you tried it on another machine running XP and IE 7? I'm looking for more data points. eric :-)
            JoeO


              Well my home computer DOES have IE6 (Windows 2000) and it does NOT have the problem. There's a bizarro data point for you. Here's the critical info Windows 2000 (Version 5.0 Build 2195, Service Pack 4) IE 6.0.2800.1106
              eric :)


                Joe, I found the problem. You have almost 900 courses, which takes quite some time for the combo box's javascript code to parse. I don't think there's anything you can do other than eliminate many of them to resolve this problem. I will have to filter some of them out on the graphing and searching page so that it will take less time. eric :-)
                JoeO


                  Aha! Makes perfect sense. Importing all those years of CoolRunning courses -- where I could write anything I wanted for the course -- resulted in the creation of umpteen RunningAhead courses. I don't understand why Firefox or IE6 didn't have a problem with it though. I can probably make it much easier for myself by consolidating them. I'll do that. Thanks for investigating!
                  eric :)


                    Joe, I uploaded a workaround to your situation. I don't think you'll need to consolidate your courses if you don't want to anymore. Here's the expected new behavior... Just as before, the workout editor will load only 50 courses. The search page will now do the same thing so that you don't have to wait for the page to load. As you type, the page will request more courses from the server matching what you've typed and will auto populate the dropdown. There maybe a small delay due to server lag and such. I always wanted to add this feature. eric :-)