Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iexplore.exe 25 percent CPU and very slow table response without iframe element in html code. #400

Closed
phenrol opened this issue Feb 12, 2013 · 16 comments

Comments

@phenrol
Copy link

phenrol commented Feb 12, 2013

Hello,

I was taking a look at handsontable (great job BTW) and noticed a problem when I was testing in different browsers. The problem I experienced was only in IE (I happen to run IE 8 and admittedly have not tested on other workstations or IE versions).

Problem: The CPU usage for the iexplore.exe process raised to a constant ~25% utilization and the table (handsontable) became unusable due to extreme slowness.

Here is the sample PHP page I created:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <?php
    //will put PHP stuff here
    ?>
    <html>
    <head>
      <meta charset='utf-8'>
      <title>yoink!</title>
      <script src="js/jquery.min.js"></script>
      <script src="js/jquery.handsontable.full.js"></script>
      <link rel="stylesheet" media="screen" href="css/jquery.handsontable.full.css">
    </head>
    <body class="home">
    <?php
    //will put PHP stuff here
    ?>
    <div id="example"></div>
        <script>
          var data = [
            ["", "Maserati", "Mazda", "Mercedes", "Mini", "Mitsubishi"],
            ["2009", 0, 2941, 4303, 354, 5814],
            ["2010", 5, 2905, 2867, 412, 5284],
            ["2011", 4, 2517, 4822, 552, 6127],
            ["2012", 2, 2422, 5399, 776, 4151]
          ];
          $('#example').handsontable({
            data: data,
            minRows: 5,
            minCols: 6,
            minSpareRows: 1,
            autoWrapRow: true,
            colHeaders: true,
            contextMenu: true
          });
          $('.ver').html($('#example').data('handsontable').version);
        </script>
    </body>
    </html>

The solution I found was interesting to say the least. I had to add an iframe element to the code and all the problems went away. Here was my final "sample" PHP page that worked fine in IE:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <?php
    //will put PHP stuff here
    ?>
    <html>
    <head>
      <meta charset='utf-8'>
      <title>yoink!</title>
      <script src="js/jquery.min.js"></script>
      <script src="js/jquery.handsontable.full.js"></script>
      <link rel="stylesheet" media="screen" href="css/jquery.handsontable.full.css">
    </head>
    <body class="home">
    <?php
    //will put PHP stuff here
    ?>
    <div id="example"></div>
          <iframe id="wow" src="https://foo" frameBorder="0" style="visibility:hidden;display:none" ></iframe>
        <script>
          var data = [
            ["", "Maserati", "Mazda", "Mercedes", "Mini", "Mitsubishi"],
            ["2009", 0, 2941, 4303, 354, 5814],
            ["2010", 5, 2905, 2867, 412, 5284],
            ["2011", 4, 2517, 4822, 552, 6127],
            ["2012", 2, 2422, 5399, 776, 4151]
          ];
          $('#example').handsontable({
            data: data,
            minRows: 5,
            minCols: 6,
            minSpareRows: 1,
            autoWrapRow: true,
            colHeaders: true,
            contextMenu: true
          });
          $('.ver').html($('#example').data('handsontable').version);
        </script>
    </body>
    </html>

So, what do you think? Why do you suppose I had to add an iframe? To bake your noodle even more, the iframe required a source that had either http:// or https:// in it, but notice its not even a valid site and it can be hidden. Strange indeed. How can I help resolve this issue? Or is this by design somehow? :)

@phenrol
Copy link
Author

phenrol commented Feb 16, 2013

Anyone have any info on this? Is there anyone who can replicate this issue?

@phenrol
Copy link
Author

phenrol commented Feb 17, 2013

Is there anyone out there who is interested in helping me review this potential bug?

@warpech
Copy link
Member

warpech commented Feb 17, 2013

I am using IE9 with IE8 mode (Windows 7) and I cannot reproduce the issue there... Were you able to reproduce this issue on other machines?

From what I see, you use the same code as in the basic example on the homepage. So do you also get 25% CPU utilization when visiting http://handsontable.com/ ?

Do you have a 4-core processor? Usually 25% utilization means that the script is using 100% of the assigned CPU core. Anyway, this is not expected to use that much CPU so something is wrong there :)

@phenrol
Copy link
Author

phenrol commented Feb 18, 2013

I can recreate with other systems running IE 8 (windows 7...have not tried other O/S). The example on the homepage has the iframe tag in it, therefore it does not exhibit the problem. Its when I take the example code, run it on my own web server and remove the iframe tags that I get the issue. The issue only manifests with IE8 so far (as I have not tested IE 9 with IE 8 mode on win7 or other combinations of browsers and O/S)

I do have a 4 core processor (i5).

Very strange and rather concerning. Any ideas?

@bpire
Copy link

bpire commented Feb 21, 2013

Hi,

I'm currently evaluating the integration of handsontable into our code. We are using IE8 and I'm experiencing the same issue, loading a smaple page consume all the cpu. Adding the Iframe like in the above example, seems to fix the issue...

@phenrol
Copy link
Author

phenrol commented Feb 23, 2013

Wow! Thank you for confirming what I found! :) I appreciate you looking into this as well.

Its rather annoying that the work around is to put in an iframe tag in order to fix the problem with IE.

Anyone out there want to take a closer look at this bug to see about resolving it? Pretty please?

@ivanbyang
Copy link

Hi,

I am using IE8, and there are 2 issues (but not in Chrome). Do anyone have the same problem?

  1. When I visit http://handsontable.com/, I got lots of below error in IE console.
    Object required jquery.handsontable.full.js, line 6278 character 4
    Error line:
    this.x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;

Do I need to enable any IE config?

  1. I still got the slowness issue, even add the iframe tag in it,

(PS: I am using Handsontable 0.7.2 and there are more than 50 rows in the grid)

@ivanbyang
Copy link

BTW, when I visit http://handsontable.com/demo/scroll.html in IE8, I get below message.

image

@bpire
Copy link

bpire commented Feb 26, 2013

I can confirm the above message. It is unusable on IE8.

@warpech
Copy link
Member

warpech commented Feb 27, 2013

I think I managed to reproduce it. It happens when rendering grid causes browser scrollbar to appear, and then temporary removing it causes the scrollbar to disappear (this is how HT measures the dimensions of its container). Fix will proibably be available tomorrow!

Therefore, it looks to be connected with #428

@joseramalho
Copy link

Is there any development on this topic?

I'm trying to use handsontable in one project but, I tried the 0.7.5 version of it and it freezes the IE8 when loading the data.
Then I tried to use the 0.8.5 version and it loads very fast but has a problem when scrolling, it is to slow. Also, when we change a value in one cell, the old value appears when we leave the cell and only then the new value appears.

Cheers

@warpech
Copy link
Member

warpech commented Feb 27, 2013

I believe I have fixed window resize problems just now in version 0.8.6. I am closing this thread hoping that solves the problem. Could you please reopen it if you experience the same problems after upgrade?

@warpech warpech closed this as completed Feb 27, 2013
@joseramalho
Copy link

I didn't have enough time to test it, but the page http://handsontable.com/demo/scroll.html is not working in IE8 yet.

I'll check later if it is ok or not.

@warpech
Copy link
Member

warpech commented Feb 27, 2013

It works ok for me (IE9 in IE8 mode) :( Are you sure you are not seeing previous version from cache?

@joseramalho
Copy link

Well as I said in my previous comment, I didn't had time to test it properly but I tried to refresh the page using CTRL+F5 and I still got that popup saying "Stop running this script?".

I'm using IE8 not IE9 in IE8 mode... but I'll test it properly later. Sorry :|

@PassHours
Copy link

The problem still exists even with the new version of HOT. Chrome has no such issue though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants