Closed Bug 371833 Opened 19 years ago Closed 19 years ago

"Edit attachment as comment" could be twice as fast

Categories

(Bugzilla :: Attachments & Requests, defect)

2.23.4
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: bzbarsky, Assigned: reed)

Details

(Keywords: perf)

Attachments

(1 file)

The current code is: // Copy the contents of the diff into the textarea var editFrame = document.getElementById('editFrame'); editFrame.value = theContent; editFrame.value += "\n\n"; replacing those last two lines with editFrame.value = theContent + "\n\n"; would be a significant speedup.
OS: Linux → All
Hardware: PC → All
Version: 2.23.3 → 2.23.4
Attached patch patch - v1 — — Splinter Review
Implement bz's request. Requesting timeless as a reviewer, as he knows JS well. Somebody else is free to steal it, though.
Assignee: attach-and-request → reed
Status: NEW → ASSIGNED
Attachment #256526 - Flags: review?(timeless)
Comment on attachment 256526 [details] [diff] [review] patch - v1 I see no difference *at all* with a 1 Mb file.
Attachment #256526 - Flags: review?(timeless) → review+
Flags: approval?
Flags: approval3.0?
Yeah, this is acceptable for 3.0, as a trivial change, but I don't understand the difference between adding those two stings separately, unless Javascript has fast string concatenation (unlike every other recent OO language that I know of).
Flags: approval?
Flags: approval3.0?
Flags: approval3.0+
Flags: approval+
It doesn't have fast string concatenation. But you were doing the concatenation anyway, as well as an extra parsing and serialization step.
trunk: Checking in template/en/default/attachment/edit.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/attachment/edit.html.tmpl,v <-- edit.html.tmpl new revision: 1.42; previous revision: 1.41 done BUGZILLA-3_0-BRANCH: Checking in template/en/default/attachment/edit.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/attachment/edit.html.tmpl,v <-- edit.html.tmpl new revision: 1.41.2.1; previous revision: 1.41 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 3.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: