Closed Bug 92630 Opened 24 years ago Closed 19 years ago

list number conversion (1 -> "i", 2 -> "ii" ...) done during paint

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bratell, Unassigned)

Details

(Keywords: helpwanted, perf, Whiteboard: [good first bug])

Attachments

(1 obsolete file)

In nsBulletFrame, the list number conversion is done during paint. This is no noop operation for large roman numbers for instance, so the result should be cached or computed during reflow. I saw this while working on the Integer->Roman conversion and testing with big numbers. The window become unresponsive and almost impossible to scroll. I've changed my implementation to not handle as big numbers (Try to write 2 billions in roman digits without using the boxed variants) to make it faster, but this calculations shouldn't be repeated all the time.
Keywords: perf
Reassigning to attinasi.
Assignee: karnaze → attinasi
In the patch in bug 92065 I limited myself to numbers > 500000 and then the window is responsive at least on my (fast) computer.
Accepting.
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0
Target Milestone: mozilla1.0 → Future
.
Assignee: attinasi → block-and-inline
Status: ASSIGNED → NEW
Component: Layout → Layout: Block & Inline
Priority: P3 → --
QA Contact: cpetersen0953 → ian
Target Milestone: Future → ---
So the goal here would be to cache the string and only reset it during reflow... See nsBulletFrame.cpp, the Paint() and Reflow() methods.
Keywords: helpwanted
Whiteboard: [good first bug]
Attached patch Patch v1 (obsolete) — Splinter Review
FYI, I'm new at patching code.
Who should I ask for r=?
Attachment #162961 - Flags: review?(roc)
+ PRBool mRegularStringType; Make it a PRPackedBool. It's good to make patches with the -t option to get the function names in the diff. The code looks great but I am rather surprised that it's necessary. How sure are we that Daniel was right about the performance issues ... and that he's still right? I'm really surprised because the code to compute the strings seems a lot simpler than the code that paints or measures them.
Attachment #162961 - Attachment is obsolete: true
Attachment #162961 - Flags: review?(roc)
I should have tried that before I posted the patch; actually, I can't tell the difference in rough perf testing. It increases footprint for long lists, and probably slows it down, although I couldn't tell. Oh well, I should check next time. That code needs some other changes I was looking at; maybe I'll try to patch a couple of those.
Overall, not worth doing, so marking WONTFIX.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: