Closed Bug 28068 Opened 26 years ago Closed 2 years ago

every caret blink creates a new graphics context

Categories

(Core :: Graphics, defect, P3)

defect

Tracking

()

RESOLVED INVALID
Future

People

(Reporter: dmosedale, Unassigned)

References

Details

(Keywords: helpwanted, perf)

Found this with quantify a while back. On X, this is a painful thing to do, because it involves extra roundtrips to the X server.
Keywords: perf
M15
Target Milestone: M15
M16
Target Milestone: M15 → M16
moving this to m17 since this is perf work
Target Milestone: M16 → M17
Keywords: nsbeta3
Target Milestone: M17 → M18
moving to m19
Target Milestone: M18 → M19
Keywords: nsbeta3
I suspect that nsbeta3 falling out of the keywords was an accident, not intentional, given the accompanying comment. Putting it back.
Keywords: nsbeta3
setting to nsbeta3-, performance issues will be addressed after correctness and polish bugs are resolved NOTE: performance issues will be addressed at the end of nsbeta3 and well after nsbeta3, therefore I wish to remove the nsbeta3 keyword
Whiteboard: [nsbeta3-]
Given that customers will tend to use an unpolished but performant product, but not a slow but polished product, making performance last priority seems folly, since it could then fall off the end of the schedule. Anyway, nsbeta3 has long been touted as the performance beta. When did this change?
Whiteboard: [nsbeta3-]
marking nsbeta3-: performance bugs will be an on-going task and will continue to be addressed during and well after nsbeta3
Whiteboard: [nsbeta3-]
I've tried to keep an RC around, and reuse it if the view being used to draw the caret does not change, but this invariably results in the caret drawing in the wrong place, or other messed up drawing. So I'm looking for help on this. Any patches need to be tested thoroughly on all 3 platforms, because caret drawing is sensitive to the details of how drawing happens.
Status: NEW → ASSIGNED
Keywords: helpwanted
moving to future per review with bij and beppe
Target Milestone: M19 → Future
Keywords: mozilla0.9
Keywords: nsbeta3 → nsbeta1
Whiteboard: [nsbeta3-]
Cc'ing myself. Anyone working on this?
Blocks: 104166
The report at http://www.mozilla.org/performance/mallocsites20011031.html (see bug 67618 for more info) shows that 340 rendering contexts are created at startup because of nsCaret::DrawCaret(). There might be something to investigate here.
Actually when I generated that report, I left the browser window up for a while (caret blinking in the URL bar), so most of those allocations are probably not 'startup' per se.
OS: Linux → All
Hardware: PC → All
This should be fixed for 1.4a.
Flags: blocking1.4a?
Flags: blocking1.4a? → blocking1.4a-
Blocks: 188318
Using the 'Resources' extension to XFree4.3 I checked and saw that this does not in fact happen. A lot of contexts are being leaked, but not due to blinking the caret. /if/ the GCs column shows graphic contexts that is.. http://www.freedesktop.org/Software/xrestop for the tool.
Depends on: 241507
Please Note: bug 241507 removed #define DONT_REUSE_RENDERING_CONTEXT for unix platforms, however that caused the crash noted in bug 254049, and so it is now being changed to just be removed for non-gtk2 builds.
QA Contact: sujay → editor
Assignee: sfraser_bugs → nobody
Status: ASSIGNED → NEW

Mass-removing myself from cc; search for 12b9dfe4-ece3-40dc-8d23-60e179f64ac1 or any reasonable part thereof, to mass-delete these notifications (and sorry!)

Severity: normal → S3

As far as I know, gfx in these days is really different from the one in 200X. So I think that a new bug should be filed if there is. However, I'm not familiar with graphic context management. Therefore, I just move to proper component.

Component: DOM: Editor → Graphics
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.