Project

General

Profile

Actions

Task #50318

closed

Make DiffUtility faster and much more scaleable.

Added by Kasper Ligaard over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-07-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
no-brainer
Sprint Focus:

Description

The method DiffUtility->explodeStringIntoWords() can be made faster and able to handle much larger inputs.

The problem: When the content element you wish to see the history for is many lines long, then History-view becomes slower.

As an extreme example, I have a 7000 lines long content element. It has been edited several times, so in total there at some 300KB in the history_data field for the element in the sys_history table. With the current code it takes 92 seconds to display in the History view. This can be vastly improved.

The solution: Profiling the code showed that the time was spent doing thousands of array_merge(). The fix is to collect all the arrays in an array, and then call array_merge(). It cut the time of my example above down to less than 2 seconds.

DiffUtility is used by the History-view of content elements, Workspaces, Version and Import/Export. Basically anything that needs a visual diff.

Patch forthcoming via Gerrit for master-branch.

Actions #1

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22508

Actions #2

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22508

Actions #3

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/22509

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/22510

Actions #5

Updated by Anonymous over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF