Closed Bug 230609 Opened 21 years ago Closed 3 years ago

GetBidiProperty large part of time inside nsTextFrame::ContentChanged

Categories

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

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bzbarsky, Unassigned)

References

Details

Attachments

(2 files)

GetBidiProperty large part of time inside nsTextFrame::ContentChanged To be exact: 41542 21 92 nsTextFrame::ContentChanged 31 nsFrame::GetBidiProperty 22 nsBlockFrame::ReflowDirtyChild 7 FrameManager::GetFrameProperty 6 PresShell::GetFrameManager 2 nsBlockFrame::FindLineFor 2 __i686.get_pc_thunk.bx 1 nsBlockFrame::MarkLineDirty So of the 92 hits under nsTextFrame::ContentChanged something like 54 are involved in getting the property. Is the property possibly set on any frame? Could we test for the NS_FRAME_IS_BIDI flag on the current frame to see whether we need to bother with the property? Or is that flag about something else?
Summary: smontagu, riceman, biesi → GetBidiProperty large part of time inside nsTextFrame::ContentChanged
Attached file source for the profile (deleted) —
source is from helping someone in #mozillazine. The number of iterations (|seconds|) starts at around 7 million right now.
Oh, and it will take a while (10 minutes or more on my 1.6GHz pentium) to run to completion--don't run it unless you are prepared for that. It's probably a good idea to divide seconds by 10 or so before running it.
>Could we test for the NS_FRAME_IS_BIDI flag on the current frame to see whether >we need to bother with the property? Or is that flag about something else? That should be OK. We do exactly that in nsTextFrame::GetChildFrameContainingOffset() and nsTextFrame::MeasureText()
So... would it make sense to just do that check in GetBidiProperty so callers don't have to worry? Or do bidi properties get set on frames without the NS_FRAME_IS_BIDI flag? Could we at least add a IsBidiEnabled check (off the prescontext) in the latter case (like some parts of nsTextFrame do)? It'd be nice if this flag and the various properties were usefully documented or something.... and ideally, it would be good if GetBidiProperty knew which props it's safe to just bail for if NS_FRAME_IS_BIDI is not set....
I'll take this.
Assignee: mkaply → smontagu
I suppose it makes sense to fix bug 117751 before this.
Depends on: 117751
If we plan to, sure. ;)
THe patch in bug 117751 makes the testcase ~5% faster by wallclock.
Attached file testcase (deleted) —
When I say "the testcase" I mean this version of the testcase in attachment 138789 [details].
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → 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)

Trying this with a current version, I don't see anything about bidi properties in the profile any longer.

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

Attachment

General

Creator:
Created:
Updated:
Size: