? ? Success

User tests: Successful: Unsuccessful:

avatar fastslack
fastslack
2 Feb 2014

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.

avatar fastslack fastslack - open - 2 Feb 2014
avatar brianteeman brianteeman - change - 9 Aug 2014
Labels Added: ?
Removed: ?
avatar brianteeman brianteeman - change - 9 Aug 2014
Labels Added: ?
avatar zero-24
zero-24 - comment - 9 Aug 2014

@fastslack

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
avatar nicksavov nicksavov - change - 21 Aug 2014
Labels Removed: ?
avatar fastslack
fastslack - comment - 27 Aug 2014

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.

avatar fastslack fastslack - change - 27 Aug 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-08-27 05:14:16
avatar fastslack fastslack - close - 27 Aug 2014
avatar fastslack fastslack - close - 27 Aug 2014
avatar beat
beat - comment - 27 Aug 2014

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.

avatar fastslack fastslack - head_ref_deleted - 23 Mar 2015

Add a Comment

Login with GitHub to post a comment