User tests: Successful: Unsuccessful:
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 updating the table. Ordering the trashed items by rgt column descending will be more easy to compress the lft and rgt values on #__assets
table.
My tests improve the speed 50% deleting 100 items.
Labels |
Added:
?
Removed: ? |
Labels |
Added:
?
|
My tests improve the speed 50% deleting 100 items.
I have just test your patch but i can't reproduce a improved speed by 50%
Here my results:
Articles | Result (ca. ss:ms) | Patch status |
---|---|---|
50 | 11:600 | applied |
50 | 13:045 | without |
100 | 24:440 | applied |
100 | 25:612 | without |
Labels |
Removed:
?
|
Yes, seems that you are right, now the deletion is faster. I tested it time ago using this script:
https://github.com/fastslack/joomla-cli-tools/blob/master/ContentCleanup/ContentCleanup
The olders tests returns significant differences. Closing this PR.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-08-27 05:14:16 |
Probably the only way to drastically improve performance here would be with a transaction to first delete all articles, then to update the nested set once instead of after each article.
Same would have to be done to all batch processes to all items that have nested sets.
Added tracker link
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33223&start=0