Copy-paste of text from local text editor to Codepen demo is slow, but deleting that text is fast. Copy-paste of text from browser to Codepen demo is fast, but deleting that text is slow (STR in comment 8)
Categories
(Core :: DOM: Editor, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox129 | --- | fixed |
People
(Reporter: mayankleoboy1, Assigned: masayuki)
References
(Depends on 2 open bugs, )
Details
Attachments
(3 files, 14 external files)
Go to https://codepen.io/bramus/pen/MWxLjEo
VERY IMPORTANT: Make sure that the demo-pane is to the left of the screen, and the code-pane is to the right.
Copy-paste the contents of the attached js text in the codepen demo textarea
Profile with demo-pane at left: https://share.firefox.dev/4aYF6Jx
Profile with demo-pane at bottom: https://share.firefox.dev/44e6Mbi
ER: Not so, maybe?
From https://bugzilla.mozilla.org/show_bug.cgi?id=1892216#c3 , :dholbert did not observe this much time to paste the text. If the demo-pane is to the bottom and the code-pen is at the top, then the profile is completely different (and matches what :dholbert saw).
| Reporter | ||
Comment 1•2 years ago
|
||
| Reporter | ||
Comment 2•2 years ago
|
||
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Comment 4•2 years ago
•
|
||
I may have misdirected with the location of the code-pane. I dont repro the slow pasting at all now irrespective of the position of the code-pane. Make what you will of this.
Comment 5•2 years ago
|
||
I can reproduce.
-
Mayank's slow profile from comment 0, https://share.firefox.dev/4aYF6Jx , recorded with demo-pane at left [SLOW]
7 second jank, with ~5.8 seconds spent inmozilla::IMEContentObserver::DocumentObserver::EndUpdate
(The profiler shows 2905 samples, but that seems to be responsible for 5.8 seconds in the timeline view; we must be sampling every 2ms or something.) -
My own profile, https://share.firefox.dev/3U7ukK1 , recorded with demo pane at bottom [Fine]
Zero seconds spent inmozilla::IMEContentObserver::DocumentObserver::EndUpdate, though I do see 94ms inmozilla::IMEContentObserver::IMENotificationSender::SendTextChange -
My own profile, https://share.firefox.dev/3xB0J47 , recorded with demo pane at left [SLOW]
https://share.firefox.dev/3xB0J47
8.4 second jank, with 5.8 seconds spent inmozilla::IMEContentObserver::DocumentObserver::EndUpdate
Note, the first time I profiled with the demo pane at the left, I didn't get much jank and didn't see DocumentObserver::EndUpdate in my profile; but the second time I did (that's the last profile that I linked above).
Comment 6•2 years ago
|
||
(In reply to Mayank Bansal from comment #4)
I may have misdirected with the location of the code-pane. I dont repro the slow pasting at all now irrespective of the position of the code-pane. Make what you will of this.
That's good to know -- per last paragraph in comment 5, I tried twice with the demo pane at the left, and I hit the issue in the second attempt but not the first.
Comment 7•2 years ago
|
||
(side note: it looks like Mayank's on Win11, and I'm on Ubuntu 22.04; given that we've both been able to intermittently repro, it seems like there's no platform-specific stuff here.)
| Reporter | ||
Comment 8•2 years ago
•
|
||
OK, i think i get the STR. The key to repro this is to download the text to your local machine, open the text file in a local text editor, copy the text from the text editor and then paste it into the Codepen demo (irrespective of the position of the demo-pane). Pasting is slow, but then deleting the text is fast.
If on the other hand, you open the attached text file in the browser, copy the text, and then paste it the action will be fast (the text appears very fast but is usable only after a few seconds). But then deleting the text is slow.
Action : Paste the text, then Ctrl+A and Delete
Text copied from local text editor: https://share.firefox.dev/3UpM2d9 / https://share.firefox.dev/3U5dlYX
Text copied from opening the attachment in the browser: https://share.firefox.dev/3xJ4kgR / https://share.firefox.dev/3W5pDD8
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Updated•2 years ago
|
Comment 9•2 years ago
|
||
Filed Bug 1892589 for the highlight API related jank in the second case ("Text copied from opening the attachment in the browser"). I wasn't completely able to reproduce the profiles mentioned above, however I could see a ~1s jank in Highlight::Add() on my machine which I could reduce to ~200ms. This syntax highlighting-with-highlight-api codepen is a gold mine, thank you Mayank and Daniel for raising this and providing this much input. This is much appreciated! :)
| Assignee | ||
Comment 10•2 years ago
|
||
This is caused by what is discussed in bug 1844470. This is a good example to fix the issue. I'll take a look next week.
| Assignee | ||
Comment 11•2 years ago
|
||
Hmm, I don't reproduce this bug when I copy the text from some test editors including vscode. I see only less than 30 <br> elements in at pasting the attached JS file. I wonder, the clipboard format may depend on text editor and OS. Mayank, do you use which OS and which text editor?
| Reporter | ||
Comment 12•2 years ago
•
|
||
(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #11)
Hmm, I don't reproduce this bug when I copy the text from some test editors including vscode. I see only less than 30
<br>elements in at pasting the attached JS file. I wonder, the clipboard format may depend on text editor and OS. Mayank, do you use which OS and which text editor?
I use Windows11 (also see the about:support i have attached to this bug)
I reproduce this when using two different text-editors : Notepad (i.e. the builtin Windows11 notepad), and Notepad++.
Here is a profile of copying the text from Notepad : https://share.firefox.dev/4aJu4Iu
Could it be that I have some hidden IME service on my system (maybe due to some Windows11 or MS-Office setting?)
Edit: I tested on Chrome, and the behaviour is similar to Nightly - that is, slow paste when text is copied from a local text-editor, and fast paste when text is copied from the browser. The performance is worse than Nightly in both these cases.
This may imply that may be something inherently slow about Win11+local text-editors? But :dholbert could repro once on Linux too, so who knows whats really happening.
| Assignee | ||
Comment 13•2 years ago
|
||
Thank you for the quick reply, but unfortunately I cannot reproduce this with them. Similar symptom occurs in jsfidle, but it spends in their JS file in most time. Therefore, it's not same as this bug.
Could it be that I have some hidden IME service on my system (maybe due to some Windows11 or MS-Office setting?)
We cannot prepare the content information for IME when they request the content to our parent process. Therefore, we always need to create a cache in the remote process and copy the cache to the parent when the content is changed. So, the cache could be unused in some environments, but we cannot consider the environment has IME or not since modern IME API may be used for other purposes from text input.
Edit: I tested on Chrome, and the behaviour is similar to Nightly - that is, slow paste when text is copied from a local text-editor, and fast paste when text is copied from the browser. The performance is worse than Nightly in both these cases.
This may imply that may be something inherently slow about Win11+local text-editors
I guess that it's slower if the clipboard format is text/plain.
| Assignee | ||
Comment 14•2 years ago
|
||
Ah, okay, I misunderstood the STR. I tried to paste into the codepen's editor, not in the editor which is created by the script.
When I paste it, a ton of calls of ShouldBreakLineBefore for <br> elements. It seems that the bottleneck in the profile is not the direct cause of this bug. I think that we can skip caching content in some cases.
| Assignee | ||
Comment 15•2 years ago
•
|
||
Some first call-stacks of IMEContentObserver::BeginDocumentUpdate().
#01: mozilla::dom::Document::BeginUpdate (M:\src\dom\base\Document.cpp:7977)
#02: mozilla::dom::Element::UnsetAttr (M:\src\dom\base\Element.cpp:2961)
#03: nsHTMLScrollFrame::SetScrollbarEnabled (M:\src\layout\generic\nsGfxScrollFrame.cpp:6745)
#04: nsHTMLScrollFrame::ReflowFinished (M:\src\layout\generic\nsGfxScrollFrame.cpp:6366)
#05: mozilla::PresShell::DidDoReflow (M:\src\layout\base\PresShell.cpp:9755)
#06: mozilla::PresShell::ProcessReflowCommands (M:\src\layout\base\PresShell.cpp:10162)
#07: mozilla::PresShell::DoFlushPendingNotifications (M:\src\layout\base\PresShell.cpp:4436)
#08: mozilla::dom::Document::FlushPendingNotifications (M:\src\dom\base\Document.cpp:10946)
#09: nsGenericHTMLElement::GetInnerText (M:\src\dom\html\nsGenericHTMLElement.cpp:3163)
#10: mozilla::dom::HTMLElement_Binding::get_innerText (M:\fx64-dbg\dom\bindings\HTMLElementBinding.cpp:378)
#01: mozilla::dom::Document::BeginUpdate (M:\src\dom\base\Document.cpp:7977)
#02: mozilla::dom::Element::UnsetAttr (M:\src\dom\base\Element.cpp:2961)
#03: nsScrollbarFrame::UpdateChildrenAttributeValue (M:\src\layout\xul\nsScrollbarFrame.cpp:519)
#04: nsScrollbarFrame::AttributeChanged (M:\src\layout\xul\nsScrollbarFrame.cpp:165)
#05: mozilla::RestyleManager::AttributeChanged (M:\src\layout\base\RestyleManager.cpp:3663)
#06: mozilla::PresShell::AttributeChanged (M:\src\layout\base\PresShell.cpp:4596)
#07: mozilla::dom::MutationObservers::NotifyAttributeChanged (M:\src\dom\base\MutationObservers.cpp:152)
#08: mozilla::dom::Element::UnsetAttr (M:\src\dom\base\Element.cpp:2997)
#09: nsHTMLScrollFrame::SetScrollbarEnabled (M:\src\layout\generic\nsGfxScrollFrame.cpp:6745)
#10: nsHTMLScrollFrame::ReflowFinished (M:\src\layout\generic\nsGfxScrollFrame.cpp:6366)
#11: mozilla::PresShell::DidDoReflow (M:\src\layout\base\PresShell.cpp:9755)
#12: mozilla::PresShell::ProcessReflowCommands (M:\src\layout\base\PresShell.cpp:10162)
#13: mozilla::PresShell::DoFlushPendingNotifications (M:\src\layout\base\PresShell.cpp:4436)
#14: mozilla::dom::Document::FlushPendingNotifications (M:\src\dom\base\Document.cpp:10946)
#15: nsGenericHTMLElement::GetInnerText (M:\src\dom\html\nsGenericHTMLElement.cpp:3163)
#16: mozilla::dom::HTMLElement_Binding::get_innerText (M:\fx64-dbg\dom\bindings\HTMLElementBinding.cpp:378)
#01: mozilla::dom::Document::BeginUpdate (M:\src\dom\base\Document.cpp:7977)
#02: mozilla::dom::Element::SetAttr (M:\src\dom\base\Element.cpp:2569)
#03: nsHTMLScrollFrame::SetCoordAttribute (M:\src\layout\generic\nsGfxScrollFrame.cpp:6770)
#04: nsHTMLScrollFrame::UpdateScrollbarPosition (M:\src\layout\generic\nsGfxScrollFrame.cpp:5786)
#05: mozilla::PresShell::SetVisualViewportOffset (M:\src\layout\base\PresShell.cpp:11588)
#06: nsHTMLScrollFrame::ScrollToImpl (M:\src\layout\generic\nsGfxScrollFrame.cpp:3279)
#07: nsHTMLScrollFrame::CompleteAsyncScroll (M:\src\layout\generic\nsGfxScrollFrame.cpp:2361)
#08: nsHTMLScrollFrame::ScrollToWithOrigin (M:\src\layout\generic\nsGfxScrollFrame.cpp:2523)
#09: nsHTMLScrollFrame::ScrollToInternal (M:\src\layout\generic\nsGfxScrollFrame.cpp:2394)
#10: nsHTMLScrollFrame::ScrollTo (M:\src\layout\generic\nsGfxScrollFrame.h:257)
#11: mozilla::PresShell::ScrollFrameIntoView (M:\src\layout\base\PresShell.cpp:3863)
#12: mozilla::dom::Selection::ScrollIntoView (M:\src\dom\base\Selection.cpp:3618)
#13: mozilla::dom::Selection::ScrollSelectionIntoViewEvent::Run (M:\src\dom\base\Selection.cpp:3520)
#14: nsRefreshDriver::Tick (M:\src\layout\base\nsRefreshDriver.cpp:2695)
#01: mozilla::dom::Document::BeginUpdate (M:\src\dom\base\Document.cpp:7977)
#02: mozilla::dom::Element::SetAttr (M:\src\dom\base\Element.cpp:2569)
#03: nsScrollbarFrame::UpdateChildrenAttributeValue (M:\src\layout\xul\nsScrollbarFrame.cpp:538)
#04: nsScrollbarFrame::AttributeChanged (M:\src\layout\xul\nsScrollbarFrame.cpp:165)
#05: mozilla::RestyleManager::AttributeChanged (M:\src\layout\base\RestyleManager.cpp:3663)
#06: mozilla::PresShell::AttributeChanged (M:\src\layout\base\PresShell.cpp:4596)
#07: mozilla::dom::MutationObservers::NotifyAttributeChanged (M:\src\dom\base\MutationObservers.cpp:152)
#08: mozilla::dom::Element::SetAttrAndNotify (M:\src\dom\base\Element.cpp:2748)
#09: mozilla::dom::Element::SetAttr (M:\src\dom\base\Element.cpp:2586)
#10: nsHTMLScrollFrame::SetCoordAttribute (M:\src\layout\generic\nsGfxScrollFrame.cpp:6770)
#11: nsHTMLScrollFrame::UpdateScrollbarPosition (M:\src\layout\generic\nsGfxScrollFrame.cpp:5786)
#12: mozilla::PresShell::SetVisualViewportOffset (M:\src\layout\base\PresShell.cpp:11588)
#13: nsHTMLScrollFrame::ScrollToImpl (M:\src\layout\generic\nsGfxScrollFrame.cpp:3279)
#14: nsHTMLScrollFrame::CompleteAsyncScroll (M:\src\layout\generic\nsGfxScrollFrame.cpp:2361)
#15: nsHTMLScrollFrame::ScrollToWithOrigin (M:\src\layout\generic\nsGfxScrollFrame.cpp:2523)
#16: nsHTMLScrollFrame::ScrollToInternal (M:\src\layout\generic\nsGfxScrollFrame.cpp:2394)
#17: nsHTMLScrollFrame::ScrollTo (M:\src\layout\generic\nsGfxScrollFrame.h:257)
#18: mozilla::PresShell::ScrollFrameIntoView (M:\src\layout\base\PresShell.cpp:3863)
#19: mozilla::dom::Selection::ScrollIntoView (M:\src\dom\base\Selection.cpp:3618)
#20: mozilla::dom::Selection::ScrollSelectionIntoViewEvent::Run (M:\src\dom\base\Selection.cpp:3520)
#21: nsRefreshDriver::Tick (M:\src\layout\base\nsRefreshDriver.cpp:2695)
The demo causes a lot of scroll position changes at appending pasted content.
| Assignee | ||
Comment 16•2 years ago
|
||
Okay, all things occur during the editor inserts content. Therefore, we can make IMEContentObserver stop notifying IME during that.
| Assignee | ||
Comment 17•2 years ago
|
||
Oh, but we do it...
| Reporter | ||
Comment 18•2 years ago
|
||
| Reporter | ||
Comment 19•2 years ago
|
||
For some reason, the text copied from the local text-editor triggers some DOMException on the testcase, and hence the text does not get syntax highlighted.
Uncaught DOMException: Index or size is negative or greater than the allowed amount
paintTokenHighlights https://bug1892514.bmoattachments.org/attachment.cgi?id=9398293:272
highlight https://bug1892514.bmoattachments.org/attachment.cgi?id=9398293:300
<anonymous> https://bug1892514.bmoattachments.org/attachment.cgi?id=9398293:317
2 attachment.cgi:272
paintTokenHighlights https://bug1892514.bmoattachments.org/attachment.cgi?id=9398293:272
highlight https://bug1892514.bmoattachments.org/attachment.cgi?id=9398293:300
<anonymous> https://bug1892514.bmoattachments.org/attachment.cgi?id=9398293:317
However, the text copied from Browser does get syntax highlighted, and scrolling through that causes checkerboarding.
https://share.firefox.dev/3We1iLM
Comment 20•2 years ago
|
||
I've encountered the highlights not appearing sometimes (mostly on linux fwiw), which seemed to be because the first pasted line is a comment. When I removed that line, highlighting appeared. Maybe you have the same issue?
Re. checkerboarding: The profile indicates that nsINode::IsSelected() is slow. I have some WIP patches that might help with that, see Bug 1867249.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 21•2 years ago
|
||
RangeBoundaryBase which is the base class of RawNodePosition stores
previous sibling of a child node which the user wants to point. Therefore,
the user code is error prone and it's hard to understand for developers.
This patch creates some factory methods and they make the code clearer in
IMEContentObserver.
Depends on D211699
| Assignee | ||
Comment 22•2 years ago
|
||
Depends on D211700
| Assignee | ||
Comment 23•2 years ago
|
||
For centralizing the caching code this moves some calls of ContentEventHandler
methods into FlatTextCache. Remaining calls in IMEContentObserver will be
moved by the following patches.
Depends on D211701
| Assignee | ||
Comment 24•2 years ago
|
||
The other, computing text length in a text node, is not required and enough
simple. Therefore, the following patches do not touch it.
Depends on D211702
| Assignee | ||
Comment 25•2 years ago
|
||
Currently, there are no tests which check the text change notifications at
"undo". "undo" of our editor inserts nodes and removes nodes in the opposite
order from the order at "do" transactions. Therefore, we need to optimize more
for "undo" in the following patches.
Additionally, the following patches makes IMEContentObserver cache the text
length longer time and use its cache in more cases. Therefore, the assertions
will help to debug the code and enabling them only when running automated tests,
we can check regressions.
Finally, we should have logging code of the cache to investigate if one of the
assertions fail.
Depends on D211703
| Assignee | ||
Comment 26•2 years ago
|
||
Currently, the caches are used only when they exactly match. However, the
direction of adding/removing siblings may be opposite from what current code
expects because they are designed for usual cases, but the undo feature of
our editor undoes things from last one to first one. Therefore, if text length
of adjacent sibling, we should compute the length from the data and avoid
computing it from start of the editing host since the range may be too long.
Depends on D211704
| Assignee | ||
Comment 27•2 years ago
|
||
Depends on D211705
| Assignee | ||
Comment 28•2 years ago
|
||
Depends on D211706
| Assignee | ||
Comment 29•2 years ago
|
||
In the following patch, we need to keep caching newly added nodes longer.
Therefore, we'll need to manage the cache with more complicated checks.
So, making the complicated things encapsulated outside IMEContentObserver
keeps IMEContentObserver itself simpler.
Depends on D211707
| Assignee | ||
Comment 30•2 years ago
|
||
Each DOM API call like nsINode::InsertNodeBefore creates a document change
transaction. Currently, IMEContentObserver flushes to pending text change
notification caused by new content nodes added in a document change when it
ends or begins another one. So, we need to make IMEContentObserver cache new
content nodes across document changes to save the number of flattened text
offset/length computation.
Currently, mAddedContentCache can store nodes in different containers to
improve the performance of setting innerHTML (bug 1250823). However, if we
keep the cache across multiple document changes, the nodes may be inserted
before the cached first content, and also the nodes may be inserted in the
range, additionally, the new ranges may be removed from the DOM again before
computing a text change notification. So, for supporting to cache new content
nodes across multiple document changes, we need to compute where new content
nodes and removed nodes are placed. Unfortunately, comparing 2 DOM node
positions is too expensive to run for each new content nodes and that makes
the fix of bug 1250823 slower. Therefore, this patch keeps the fix of
bug 1250823 as "consecutive nodes" mode of the cache, and adds new mode which
is called as "siblings" mode. If we cache only siblings in the same container,
the comparison cost is cheaper than nsContentUtils::ComparePoints. Therefore,
this patch uses the new mode when it caches new nodes across multiple document
changes.
When a document change ends or nested one starts, IMEContentObserver tries to
change the mode to "siblings" mode. If it's impossible (i.e., it stores nodes
in multiple containers), it computes a text change notification and post it.
Otherwise, it keeps using the cache with the "siblings" mode. Then, when new
content nodes are added before the editor ends handling current action,
IMEContentObserver checks whether the new nodes can be merged with the cached
range strictly and computes a text change notification if new nodes cannot be
stored with the cached range. In this case, the latest new content nodes are
ignored at computing the offset of the start of the cached range. Additionally,
when a content node is removed and the node is before the cached range, computes
a text change notification with adjusting offset of the start of the cached
range (adding the length of the removed content to the offset), or when a
content node is removed and the node is in the cached range, computes a text
change notification with adjusting length of the cached range (adding the length
of remove node).
Therefore, after applying this patch, IMEContentObserver starts to compute
offset and text length only a couple of times (at worst) for any number of new
text lines inserted by the editor because our editor inserts nodes as siblings
when inserting multiple lines. In other words, this patch does not optimize
the case when JS inserts a lot of nodes with calling DOM API with a loop. I
have no idea how to optimize this case, but currently there is no performance
bug for this. Therefore, I don't fix this now.
Depends on D211708
| Reporter | ||
Comment 31•2 years ago
|
||
Profile from the try build at https://treeherder.mozilla.org/jobs?repo=try&revision=b4de11227dab9dc4d6bb769b8f5da07695e855e8
| Assignee | ||
Comment 32•2 years ago
|
||
The preceding patches (D211697 and D211698) optimize
HTMLEditor::HandleInsertText to make the DOM mutations simpler for making
IMEContentObserver use cache to avoid to compute the similar flattened text
length a lot. However, there are not enough tests of text change notifications
in the cases. Therefore, before optimizing IMEContentObserver, we should have
more tests about that.
Depends on D211703
| Assignee | ||
Comment 33•2 years ago
|
||
It's hard to write text change notification tests to verify the cache in
IMEContentObserver. Therefore, assertions helps to detect the bug of the
cache with existing automated tests. On the other hand, the verification
requires a lot of CPU time if editor inserts a lot of text, etc. Therefore,
I'd like to add assertions behind a pref and enable it in some specific tests
and entire the tests of editor/editing API.
Depends on D211833
| Assignee | ||
Comment 34•2 years ago
|
||
This patch enables the assertions when running:
- The
nsITextInputProcessortests - The IME composition tests under
widget/ - Under
editor/libeditor/tests - Under
editor/libeditor/crashtests - Under testing/web-platform/tests/editing`
- Under testing/web-platform/tests/input-events`
Depends on D211834
Updated•2 years ago
|
| Assignee | ||
Comment 35•2 years ago
•
|
||
I find an intermittent crash of delete-content-in-no-data-object.html due to an assertion failure of the new validation method. I can reproduce it with patched build of part 5-4 (i.e., without logic changes). So, it should be an unknown bug which exists in current build. The test sets <img>.innerHTML and I'm not sure whether it works as expected with ContentEventHandler. Therefore, I'll add it as knonw-failure if I don't find the cause quickly or the cause requires non-trivial changes.
Stack:
[6527] Assertion failure: mFlatTextLength == offset.inspect(), at /builds/worker/checkouts/gecko/dom/events/IMEContentObserver.cpp:2492
#01: mozilla::IMEContentObserver::FlatTextCache::AssertIfInvalidCache(mozilla::dom::Element const*) const [dom/events/IMEContentObserver.cpp:2492]
#02: mozilla::IMEContentObserver::FlatTextCache::ContentAdded(char const*, nsIContent const&, nsIContent const&, mozilla::Maybe<unsigned int> const&, mozilla::dom::Element const*) [dom/events/IMEContentObserver.cpp:2547]
#03: mozilla::IMEContentObserver::ContentAdded(nsINode*, nsIContent*, nsIContent*) [dom/events/IMEContentObserver.cpp:961]
#04: mozilla::dom::MutationObservers::NotifyContentAppended(nsIContent*, nsIContent*) [dom/base/MutationObservers.cpp:166]
#05: nsINode::InsertChildBefore(nsIContent*, nsIContent*, bool, mozilla::ErrorResult&) [dom/base/nsINode.cpp:0]
#06: nsContentUtils::SetNodeTextContent(nsIContent*, nsTSubstring<char16_t> const&, bool) [dom/base/nsContentUtils.cpp:5970]
#07: mozilla::dom::FragmentOrElement::SetInnerHTMLInternal(nsTSubstring<char16_t> const&, mozilla::ErrorResult&) [dom/base/FragmentOrElement.cpp:1970]
Waning:
WARNING: mFlatTextLength=18, offset: 17, mContainerNode:img.s.object.div.body.html.#document[designMode="on"] @ 0x7f0171b11080 (<object onerror="onError()">
BEFOREBEFORE<s>
</s></object><div align="center"><object onerror="onError()"><s><img>
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
<kbd>
</kbd></s></object></div>
): file /builds/worker/checkouts/gecko/dom/events/IMEContentObserver.cpp:2490
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 36•2 years ago
|
||
Starting from D211834, IMEContentObserver starts to validate its cache with
the test pref only in the debug build. Then,
delete-content-in-no-data-object.html starts crashing with new assertion
failure even without the patches after D211705 (i.e., without logic changes).
Therefore, this crash is an existing bug and out of scope of this bug.
Depends on D211709
Comment 37•2 years ago
|
||
Comment 38•2 years ago
|
||
Backed out for causing bustage on IMEContentObserver.cpp
| Assignee | ||
Comment 39•2 years ago
|
||
Hmm, why is it warned only in the specific build...?
Comment 40•2 years ago
|
||
Comment 41•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/2c9ecc9076f6
https://hg.mozilla.org/mozilla-central/rev/40df049d6562
https://hg.mozilla.org/mozilla-central/rev/5c955c99b56c
https://hg.mozilla.org/mozilla-central/rev/1d34492b28f7
https://hg.mozilla.org/mozilla-central/rev/833c65d741bb
https://hg.mozilla.org/mozilla-central/rev/c3fc9232286c
https://hg.mozilla.org/mozilla-central/rev/a56158a3b83c
https://hg.mozilla.org/mozilla-central/rev/fcbd141bc1a1
https://hg.mozilla.org/mozilla-central/rev/f29747daf8de
https://hg.mozilla.org/mozilla-central/rev/27dd1891fa92
https://hg.mozilla.org/mozilla-central/rev/d9f3819f281b
https://hg.mozilla.org/mozilla-central/rev/bd2b11bf4de4
https://hg.mozilla.org/mozilla-central/rev/559c8515de2c
https://hg.mozilla.org/mozilla-central/rev/8e39756b37d7
| Reporter | ||
Comment 42•2 years ago
|
||
Profile with Nightly that contains this fix : https://share.firefox.dev/3zuZg0p
(Time has reduced from 6s->1.6s)
| Assignee | ||
Comment 43•2 years ago
•
|
||
Well, nsINode::ComputeIndexOf is still taking 0.5 sec in the profile, but it's called by EditorBase::TopLevelEditSubActionData::AddNodeToChangedRange, so, it's a performance bug of the editor module. In HandleInsertText, this is temporarily disabled. However, InsertNodeWithTransaction and CreateAndInsertElement start their own nested edit subaction. Therefore, the disablement does not work as expected by HandleInsertText. Anyway, this is a different bug.
Updated•2 years ago
|
Description
•