Forums

Posting in these forums is disabled. These forums will be available for archive purposes. Please join the new forums at the links below:

  • yui-support - replaces the `YUI 3.x` and `YUI 3 Gallery` forums.
    We have created the following discussion categories within this group to aid discoverability for these most-used topics:
    • Charts for YUI Charts support.
    • DataTable for YUI DataTable support.
    • Gallery for YUI Gallery support, including support for published Gallery components as well as the Gallery process in general.
    • Tools for support of YUI’s suite of developer tools such as selleck, shifter, grover, yogi, etc.
    • Everything Else for questions that don’t fit one of the categories above, we’ve got you covered here.
  • yui-deprecated - replaces the `YUI 2.x` forum and the forums of other deprecated products (`YUI Doc`, `Builder`, `YUI PHP Loader`, etc.).
  [ 4 posts ]
New Topic | Post Reply | Print view
Previous topic | Next topic

Andy Medlicott

  • Username: andymed
  • Joined: Fri Sep 10, 2010 3:33 am
  • Posts: 2
  • Location: Bracknell, England
  • Offline
  • Profile
Tags:
  • IE performance
  • chrome
  • event
  • firefox
  • general
  • number
  • performance
  • tree
  • treenode
  • yui2
  • yui3

Poor tree performance in IE compared to Chrome

Post Posted: Fri Sep 10, 2010 5:05 am
+0-
Hi.

We have an application being developed using YUI2 which seems to perform very well in Chrome but quickly grinds to a halt using IE (we've used both versions 7 and 8 with similar results).

One area we've identified is the creation of TreeNode objects which seems to take a lot longer in IE (60s+ compared to sub-second in Chrome) - granted the numbers are large, around 3000, but these nodes are not visible initially and it simply seems to be creation of the objects that takes the bulk of the time. Even when we restrict the number of treenodes being created to around 100 the whole resposiveness of the UI still seems to suffer - such as using the scrollbar or reszing the window 'freezes' for several seconds before responding. In addition I find the application in IE feels sluggish in general so I suspect that the treenode is only one instance of a more common problem. Chrome doesn't appear to become sluggish with the same pages.

To my mind this sort of behaviour point to lots of event listeners being created and accessed during normal UI operations - for instance if we disable the display of tooltips then it does seem to improve the UI suggishness which might be because there are less mouseover events? However tooltips and 'drag and drop' are essential to the application - as is IE support.

Does anyone know if IE handles events significantly differently from Chrome or Firefox? Or does this sound like something else? We could look at migrating to using YUI3 and using delegate event handlers if that is likely to solve the problem, but it seems strange that there is such a vast difference between IE and other browsers and I'm wondering if we're just doing something silly? I'm at a loss as to how to investigate and diagnose this performance problem any further... any suggestions welcome. :)

Kind Regards,
Andy

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2017
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: Poor tree performance in IE compared to Chrome

Post Posted: Fri Sep 10, 2010 5:46 am
+0-
IE is significantly slower than any other browser. There is, indeed, a very different way in which IE handles events from any other: they do it badly.

ToolTips and drag and drop are not built-in features of TreeView so I guess that those were added by you. And since you mention event delegation as a YUI3 feature, I would like to mention that you can do event delegation very easily in YUI2 as well and that without even bothering with the event-delegate module.

Andy Medlicott

  • Username: andymed
  • Joined: Fri Sep 10, 2010 3:33 am
  • Posts: 2
  • Location: Bracknell, England
  • Offline
  • Profile

Re: Poor tree performance in IE compared to Chrome

Post Posted: Fri Sep 10, 2010 6:26 am
+0-
Hi Satyam,

Thanks for the quick reply. You're right about the tooltips being added - they are implemented using the tooltip widget in YUI... Seeing how removing them made a noticable difference I guess the question is also what sort of overhead do they place on the browser when there are hundreds of them and are there any alternatives?

Cheers,
Andy

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2017
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: Poor tree performance in IE compared to Chrome

Post Posted: Fri Sep 10, 2010 7:08 am
+0-
Indeed, there is. I was faced with the same issue trying to put tooltips on a DataTable. I made this example to show the principle. Of course, the example has only a few rows, but in my actual application, there were too many cells.

Instead of making an enormous array of triggers for the ToolTip, you can use event delegation on the container of them all as I did in this example for the DataTable. I checked whether the elements receiving the event were the table cells I cared for, you would have to check for the target being the TreeNode elements you care for.
  [ 4 posts ]
New Topic | Post Reply | Print view
Previous topic | Next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum