Open Bug 35295 Opened 25 years ago Updated 2 years ago

PERF: edit rules postproccessing slow on large pastes.

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

People

(Reporter: mozeditor, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [has draft patch])

Attachments

(3 files)

the big culprit here is whitespace conversion. Scott mentioned that there are stream-based strings in place now. I could use these to convert whitespace on the fly as I am first inserting it into the dom - this should save some time. dont know how much...
Blocks: 28783
i accept Bugzilla as my lord and savior.
Status: NEW → ASSIGNED
m17
Target Milestone: --- → M17
Adding perf keyword
Keywords: perf
moving to m19
Target Milestone: M17 → M19
please do not nominate for nsbeta3 -- this will be addressed after crashes, regressions, correctness and polish bugs have been resolved, all Composer perf bugs have been set to m19/m20
reviewed by Bijal and beppe, setting to nsbeta3+, p2
Keywords: nsbeta3
Priority: P3 → P2
Whiteboard: [nsbeta3+][p:2]
Blocks: 53252
No longer blocks: 28783
paste is such a high profile function, after much discussion, we are bumping this up to p1 & rtm+
Priority: P2 → P1
Whiteboard: [nsbeta3+][p:2] → [nsbeta3-][rtm+][p:1]
Whiteboard: [nsbeta3-][rtm+][p:1] → [nsbeta3-][rtm+ NEED INFO][p:1]
Joe, please include the required information per the rtm checkin rules
PDT marking [rtm-] since the performance impact is not quantified. Please renominate if/when the user impact is explained in the bug.
Whiteboard: [nsbeta3-][rtm+ NEED INFO][p:1] → [nsbeta3-][rtm-][p:1]
will have to wait till post-rtm
Target Milestone: M19 → Future
Ok, so this change is expiremental, but it does reduce the amount of editor code involved in quoting a mail reply tremendously. Johnny, this patch uses InsertBefore() or AppendChild(), as appropriate, of a docFrag to put everything into the dom tree at once. You can use this as a test bed for improving docFrag insertion speed, assuming you construct the right test message (one with a lot of nodes that are children of the docFrag). Note that regular text insertion in the editor still does not use docFrags. That work will be more difficult, so I want to wait until docFrags are fast before tackling it. So use HTML mail compose for your test.
Keywords: nsbeta3
Whiteboard: [nsbeta3-][rtm-][p:1] → [perf]
Target Milestone: Future → mozilla1.0
updated diffs. this is actually the wrong bug to be putting them in. I'll track down the mail reply perf tracking bug and put them there too.
Attached patch diffs for editorSplinter Review
I left out an .idl file in earlier diffs. This one should have everything you need.
nsHTMLEditor::InsertHTMLWithCharset() has this comment: + // nuke the undo/redo stack Should this be implemented? +NS_IMETHODIMP nsHTMLEditor::PasteHTML(const nsAReadableString & aInString) +{ nsAutoString charset; - return InsertHTMLWithCharsetAndContext(aInputString, charset, aContextStr, aInfoStr); + return PasteHTMLWithCharset(aInString, charset); } Better to use NS_LITERAL_STRING("") in place of an empty nsAutoString. Ditto in PasteHTMLWithContext(), and in PasteHTMLWithCharset(). +#ifdef EDITOR_MAC_INSTRUMENTATION + INST_TRACE("EndReflowBatching"); +#endif Personally, I don't think we should litter the tree with instrumentation droppings. r/sr on the changes if you address these issues.
Blocks: 28783
Target Milestone: mozilla1.0 → mozilla0.9.7
Target Milestone: mozilla0.9.7 → mozilla0.9.9
the swami says: things that will not land in 099!
Target Milestone: mozilla0.9.9 → mozilla1.0
Moving to Mozilla1.1. Engineers are overloaded working on higher priority bugs.
Target Milestone: mozilla1.0 → mozilla1.1
removing myself from the cc list
The days of having a half dozen milestones out in front of us to divide bugs between seem to be gone, though I dont know why. Lumping everything together as far out as I can. I'll pull back things that I am working on as I go.
Target Milestone: mozilla1.1alpha → mozilla1.2beta
[ushing these out as far as bugzilla will let me. I'll pull them back as I work on them.
Target Milestone: mozilla1.2beta → mozilla1.4beta
still a worthy patch? (and if so, why major?)
Joe, was the perf gain ever quantified? bug 35292 is the only bug to have checked in a patch for paste performance
Assignee: mozeditor → nobody
Status: ASSIGNED → NEW
QA Contact: sujay
QA Contact: editor
not clear to me if this perf issue still exists, or if any of the related bugs have/describe testcase in detail (on cursory examination, i'm not finding any testcase files) bug 28783 comment 0 has one description. And several detailed comments about code. note bug 74912 comment 13.
Blocks: 74912, 74914
Severity: major → normal
Whiteboard: [perf] → [has draft patch]
Target Milestone: mozilla1.4beta → ---
old bug
Priority: P1 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: