cclaerhout
Well-known member
Mike could you please take a look at the function "XenForo.PopupMenu" on Firefox with list that has many elements (about 1000 items). It might come from my browser, but it seems changing this code:
	
	
	
		
to this code improves the performance:
	
	
	
		
I still need to do further tests on a live installation (with Firebug opens, it's for sure but this is not representative).
				
			
		Code:
	
	      // bind events to the menu control
       this.$clicker = $container.find('[rel="Menu"]').first().click($.context(this, 'controlClick'));
       if (!XenForo.isTouchBrowser())
       {
         this.$clicker.mouseover($.context(this, 'controlHover')).hoverIntent(
         {
           sensitivity: 1,
           interval: 100,
           timeout: 0,
           over: $.context(this, 'controlHoverIntent'),
           out: function(){}
         });
       }
	to this code improves the performance:
		Code:
	
	      // bind events to the menu control
       var self = this;
       this.$clicker = $container.find('[rel="Menu"]').first().on('click', $.context(self, 'controlClick'));
       if (!XenForo.isTouchBrowser())
       {
         var controlOverLoaded = false;
         self.$clicker.on('mouseover', function(e){
           $.proxy(self, 'controlHover', e);
           $(this).hoverIntent({
             sensitivity: 1,
             interval: 100,
             timeout: 0,
             over: $.context(self, 'controlHoverIntent'),
             out: function(){}
           });
           
           if(!controlOverLoaded ){
             controlOverLoaded = true;
             $(this).trigger('mouseover');
           }
         });
       }
	I still need to do further tests on a live installation (with Firebug opens, it's for sure but this is not representative).