8 | | Replying to [ticket:9546 frederik.elvhage]: |
9 | | > The (jQuery-UI) cleanData-Proxy i find in my jquery-ui-1.10.1.custom.js slows down ajax-calls (especially) in internet explorer 8. |
10 | | > |
11 | | > I have found that removing this proxy will reduce ajax-processing time by more than 60% in IE8 and on large ajax-calls (~3.3s -> 1.1s). |
12 | | > |
13 | | > It is obviously a counter-measure for a jquery-bug that has been fixed in 1.6.3. |
14 | | > {{{ |
15 | | > $.cleanData = function( elems ) { |
16 | | > for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { |
17 | | > try { |
18 | | > $( elem ).triggerHandler( "remove" ); |
19 | | > // http://bugs.jquery.com/ticket/8235 |
20 | | > } catch( e ) {} |
21 | | > } |
22 | | > _cleanData( elems ); |
23 | | > }; |
24 | | > }}} |
25 | | > |
26 | | > I suggest removing this proxy and change legacy-support to 1.6.3+ (instead of 1.6+). |
| 7 | I.e. the widget could set a flag on initialization and check it in the cleanData-Method. |
| 8 | |
| 9 | I have made another fiddle that allows testing of different cleanData-Implementations here: |
| 10 | [http://jsfiddle.net/felvhage/r7buw/ jsfiddle/cleanData][[BR]] |
| 11 | |
| 12 | My first naive implementation will test for the existance of events before it calls the remove-handler. |
| 13 | This already saves at least 90% of the overhead. I will look further into this in time an provide a pull request. |
| 14 | |
| 15 | |