Bug #35172
Connection timeout when parsing large number of changed records
| Status: | Resolved | Start date: | 2012-03-23 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | Bugs | |||
| Target version: | - | |||
| TYPO3 Version: | 4.5 | PHP Version: | 5.3 | |
| Votes: | 10 (View) |
Description
Connection timeout occurs when large number of modified records is being loaded in Workspaces module.
AJAX timeout (after 30 secods) seems to be the cause.
Some more details:
- workspace (live/draft) doesn't matter
- multiple domains in TYPO3 installation
Alosi the Depth selection is reset to Infinite when another page in pagetree is selected.
Related issues
| related to Workspaces & Versioning - Bug #30405: Switching Workspaces results in Connection Timeout | Closed | 2011-09-28 | ||
| related to Workspaces & Versioning - Bug #39731: Calculate percentage of differences if column is shown | Under Review | 2012-08-12 | ||
| related to Workspaces & Versioning - Bug #39727: Calculating percentage of differences is slow | Rejected | 2012-08-12 | ||
| related to Workspaces & Versioning - Task #44189: Workspaces: Preview all for editors | Accepted | 2012-12-21 |
Associated revisions
[BUGFIX] Prevent time-outs when calculating change percentage
Fixes the complex and unnecessary calculation of the change percentage
of a record. This may have led to various timeouts when calculating this
for long strings.
Change-Id: I726236a37b0cf71772befeeabb3f0f18fe86a037
Fixes: #35172
Releases: 6.0
Reviewed-on: http://review.typo3.org/10949
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Prevent time-outs when calculating change percentage
Fixes the complex and unnecessary calculation of the change percentage
of a record. This may have led to various timeouts when calculating this
for long strings.
Since this is still a nasty issue in older branches too, the
patch that was already released to 6.0 is now backported
to 4.7, 4.6, 4.5
Change-Id: I726236a37b0cf71772befeeabb3f0f18fe86a037
Fixes: #35172
Releases: 4.7, 4.6, 4.5
Reviewed-on: https://review.typo3.org/17932
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Prevent time-outs when calculating change percentage
Fixes the complex and unnecessary calculation of the change percentage
of a record. This may have led to various timeouts when calculating this
for long strings.
Since this is still a nasty issue in older branches too, the
patch that was already released to 6.0 is now backported
to 4.7, 4.6, 4.5
Change-Id: I726236a37b0cf71772befeeabb3f0f18fe86a037
Fixes: #35172
Releases: 4.7, 4.6, 4.5
Reviewed-on: https://review.typo3.org/17931
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Prevent time-outs when calculating change percentage
Fixes the complex and unnecessary calculation of the change percentage
of a record. This may have led to various timeouts when calculating this
for long strings.
Since this is still a nasty issue in older branches too, the
patch that was already released to 6.0 is now backported
to 4.7, 4.6, 4.5
Change-Id: I726236a37b0cf71772befeeabb3f0f18fe86a037
Fixes: #35172
Releases: 4.7, 4.6, 4.5
Reviewed-on: https://review.typo3.org/17616
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
History
Updated by Jigal van Hemert about 1 year ago
Found the cause: Tx_Workspaces_Service_GridData::calculateChangePercentage() uses similar_text() to calculate the degree of difference between the content. This function is very slow for longer strings (complexity O(N**3); N is length of longest string). For some records the time needed to calculate the change percentage took several seconds. With a few hundred records in a workspace list it would easily cause a time-out.
Limiting the strings to maximum 512 chars solves the time-outs, at least until a faster function is found.
Updated by Ingo Pfennigstorf about 1 year ago
@Jigal That should not be hard to implement. Is there any use case where displaying the percentage really matters that much, that the string length cannot be cropped?
Does it work for you with a limitation to 512 chars?
Updated by Ingo Pfennigstorf about 1 year ago
So, why is this calculation still in workspaces?
With #11585 the display of the percentage was dropped (also see http://lists.typo3.org/pipermail/typo3-team-workspace/2011-January/000184.html
So I think that this calculation is obsolete and I'm going to write a patch for this, or did I miss something?
Updated by Gerrit Code Review about 1 year 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 http://review.typo3.org/10949
Updated by Gerrit Code Review about 1 year ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10949
Updated by Joe Kolade 11 months ago
Gerrit Code Review wrote:
Patch set 2 for branch master has been pushed to the review server. It is available at http://review.typo3.org/10949
Looks good to and works fine for me.
Fixed my issues with "connection problems".
I will report if errors/bugs occur.
Updated by Gerrit Code Review 10 months ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10949
Updated by Ingo Pfennigstorf 10 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4141276eb63ced02f048149c7560cf883aae89be.
Updated by Jean-Sébastien Gervais 5 months ago
Sorry to revive a closed bug, but can the patch be backported to TYPO3 4.5 LTS as well?
Updated by Gerrit Code Review 4 months ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 4.5 has been pushed to the review server.
It is available at https://review.typo3.org/17616
Updated by Dan Untenzu 4 months ago
Hey, since I need this in a 4.5 version as well, I tried to make a backport of Ingos patch and pushed it to Gerrit.
Disclaimer: It's my first backport in a submodule, I hope I've satisfied all requirements.
Updated by Jean-Sébastien Gervais 4 months ago
Thank you, tested patch on a 4.5.20 instance
Updated by Gerrit Code Review 4 months ago
Patch set 2 for branch 4.5 has been pushed to the review server.
It is available at https://review.typo3.org/17616
Updated by Gerrit Code Review 4 months ago
Patch set 1 for branch 4.6 has been pushed to the review server.
It is available at https://review.typo3.org/17931
Updated by Gerrit Code Review 4 months ago
Patch set 1 for branch workspaces_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/17932
Updated by Gerrit Code Review 4 months ago
Patch set 2 for branch 4.6 has been pushed to the review server.
It is available at https://review.typo3.org/17931
Updated by Ingo Pfennigstorf 4 months ago
- Status changed from Under Review to Resolved
Applied in changeset 06034536a5f3f50c30a91a6dc02e13083876809f.