Open Bug 1355519 Opened 7 years ago Updated 2 years ago

Can IMEContentObserver treat HTML editor as multiple editors if it's too big?

Categories

(Core :: DOM: UI Events & Focus Handling, enhancement, P3)

enhancement

Tracking

()

Performance Impact none
Tracking Status
firefox55 --- affected

People

(Reporter: masayuki, Unassigned)

References

Details

(Keywords: inputmethod, perf)

Currently, IMEContentObserver treats all contents in an HTML editor as an editor.

However, this may cause performance and footprint issue (especially on e10s mode) if the editor has too many contents. As far as I know, Word treats one page is an editor for preventing performance issue if there are too many pages.

From the point of view of IME, text outside current "paragraph" isn't so important. Using all text in an editor may make the conversion of IME improve, but it's not as important as current paragraph.

So, you can say, IMEContentObserver should treat nearest block ancestor is an editor.

However, there are some problems:

1. When caret moves across blocks, it causes sync IPC due to NotifyIMEFocus.
2. When selection crosses multiple blocks, what should we do?

#1 should be fixed with bug 1349255.

#2 might be solved with ignoring outside of first block in the selection. However, after replacing selected text, blocks will be merged. Then, IMEContentObserver needs to notify IME of appending text which was in the last block of the selection.

Perhaps, there could be more issues. Any ideas?
Whiteboard: [qf]
Whiteboard: [qf]
Whiteboard: [qf]
Whiteboard: [qf] → [qf:investigate]
Priority: -- → P2
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
Masayuki,  have you seen this causing real world issues? And how hard would this be to fix somehow?
(Just trying to figure out what kind of qf priority this should have)
Flags: needinfo?(masayuki)
Well, I tried to reproduce the symptom with big editable content and IME, but in my environment, I cannot reproduce the slowness (although, for building Firefox, not slow machine). Anyway, this is really difficult challenge, so, I don't think we need to fix this soon.
Flags: needinfo?(masayuki)
Whiteboard: [qf:investigate]
Whiteboard: [qf-]
Component: Event Handling → User events and focus handling
Performance Impact: --- → -
Whiteboard: [qf-]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.