Closed Bug 103844 Opened 23 years ago Closed 20 years ago

Comment why BoxFrame debug code is not #if DEBUG

Categories

(Core :: XUL, defect)

x86
All
defect
Not set
trivial

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: jesup, Assigned: eric)

Details

(Keywords: perf)

Attachments

(1 file)

Code bloat: the BoxFrame debug code (NS_STATE_CURRENTLY_IN_DEBUG) is not in a
#if DEBUG.  This also (slightly) slows down a host of BoxFrame methods in
release builds.

If the argument is that "we need to be able to turn on frame debugs even in a
non-debug build", then let's have something like #if DEBUG_MENU or DEBUG_PREF
and turn it off for "release" builds.  In truth, I don't see a need for this
code to be enabled for nightlies or dot-release builds either.
Keywords: perf
Component: Layout → XP Toolkit/Widgets: XUL
That's evaughan's code according to LXR -> reassign
Assignee: attinasi → evaughan
This is always turned on so 3rd parties who write XUL pages don't need to have
debug builds. There is great hope that someday XUL pages and xul applications
will become popular. We can't expect people to have special versons of Navigator
to test them, just as you can expect people to have special versions to test
HTML pages.

I have not see this show up on quantify. Do you have data to showing this is a
performance problem?

-Erc
Target Milestone: --- → Future
Ok, subject change.  Severity to trivial.

Do people know how to actually turn on this to debug their XUL?
Severity: normal → trivial
Summary: BoxFrame debug code is not #if DEBUG → Comment why BoxFrame debug code is not #if DEBUG
How about controlling whether or not this code is executed with a pref? We'll
pay the code bloat cost, but not the performance cost (except for a really
marginal cost) for checking the pref and a few if (foo) cheks here n' there)?
I'd make the argument that these days, DOM Inspector is much more useful for
third-party app developers than the box debug code would be.  Also, with the
advent of nsITheme, asking for a box's border as GetDebugBoxAt() does may call
into non-trivial platform code.  I'd like to #ifdef this DEBUG_LAYOUT... dbaron
and roc agree per IRC conversation.
Attachment #151084 - Flags: superreview?(roc)
Attachment #151084 - Flags: review?(dbaron)
Attachment #151084 - Flags: superreview?(roc)
Attachment #151084 - Flags: superreview+
Attachment #151084 - Flags: review?(dbaron)
Attachment #151084 - Flags: review+
checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: chrispetersen → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: