vitch/jScrollPane — Issue #111: IE 9 slow script response when initializing/resizing scrolled large content
Author: npfistnerp
Created: 2011-11-15 16:20:53+00:00
State: open

With some debugging I found the answer:
In jquery.jscrollpane.js, function initialiseVerticalScroll() uses a very inperformant selection (at least for IE) to resize the vertical scrollbar:

container.find('>.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow').each(

Especially when *container* contains a lot of elements it seems to trouble IE.

A fix is very simple, due to the fact that *.jspVerticalBar* is already known as *verticalBar*:

verticalBar.find('>.jspCap:visible,>.jspArrow').each(

Same Problem/Solution should apply to the corresponding horizontal bar.

Hope it helps someone stumbling apon the same performance issues.