joomla/joomla-cms — pull request #3027 by fastslack (2014-02-02 19:21:19+00:00)
Title: Optimize content delete ordering by rgt asset column

This patch optimize the content deletion when we have trashed lot of contents. The content delete function in Joomla! is very slow if we have more than 5000 items because each deletion needs to look the correct asset, delete it and update the lft and rgt value of the entire #__assets table. If we have orderer the list by name or by id, the delete() method on JTable will require much more work to move. Ordering the trashed items by rgt column descending will be more easy to compress the lft and rgt values on #__assets table. My test improve the speed 50% deleting 100 items.