Closed Bug 193212 Opened 22 years ago Closed 3 years ago

Only use CJK line breaker algorithm for CJK text

Categories

(Core :: Layout: Text and Fonts, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: smontagu, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

Attachments

(1 file)

This is an idea I experimented with last year, but didn't find that it was much of a performance win for pageload. Now I want to investigate its impact on typing and editing performance, where PrepareUnicodeText() consumes a lot of time (see figures in bug 35296). I will resurrect my patch, unbitrot it and attach it here. The general strategy is to set a flag in nsGenericDOMDataNode.cpp when CJK (Chinese, Japanese or Korean) characters are present, and only use the CJK linebreaker in nsTextTransformer when this flag is present. Otherwise we will use a simpler linebreaker which will not have to scan for CJK characters internally.
Will this change make the code simpler? If not, could we add some refactoring in the process?
OS: Windows 2000 → All
Hardware: PC → All
In principle, yes, but in the first instance I want to produce a simple-as-possible patch for use in performance profiling.
OS: All → Windows 2000
Hardware: All → PC
Attached patch Prototype patch (deleted) — Splinter Review
This patch has at least one serious bug: the nsWesternLineBreaker can end up being used even on CJK pages, because the first call to nsDocument::GetLineBreaker may be before the parser has encountered any CJK characters.
Depends on: line-breaking
No longer depends on: line-breaking
It seems to me that bug 255990 suggests pretty much the opposite (and makes more sense to me).
QA Contact: ian → layout.fonts-and-text

The bug assignee didn't login in Bugzilla in the last 7 months.
:jfkthame, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: smontagu → nobody
Flags: needinfo?(jfkthame)

The code involved here has all changed; I don't think this is relevant any more.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(jfkthame)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: