Closed Bug 671579 Opened 13 years ago Closed 13 years ago

Optimize GzipUtils::mendBrokenLines

Categories

(Tree Management Graveyard :: TBPL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mstange, Assigned: mstange)

Details

(Keywords: perf)

Attachments

(1 file)

Attached patch v1Splinter Review
For logs like mochitest-4, GzipUtils::mendBrokenLines spends way too much time in array_splice. This causes http://tbpl.swatinem.de/php/getParsedLog.php?id=5530496 to time out, for example.

This patch changes mendBrokenLines to use unset instead of array_splice. unset should be O(1), but unlike array_splice it creates holes in the array, so we need to be careful with the indices. The call to array_values at the end renumbers the array.
Attachment #545933 - Flags: review?(arpad.borsos)
Comment on attachment 545933 [details] [diff] [review]
v1

Review of attachment 545933 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #545933 - Flags: review?(arpad.borsos) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: