Comment why BoxFrame debug code is not #if DEBUG

RESOLVED FIXED in Future

Status

()

Core
XUL
--
trivial
RESOLVED FIXED
17 years ago
10 years ago

People

(Reporter: jesup, Assigned: Eric Vaughan)

Tracking

({perf})

Trunk
Future
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
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.
(Reporter)

Updated

17 years ago
Keywords: perf
Component: Layout → XP Toolkit/Widgets: XUL

Comment 1

17 years ago
That's evaughan's code according to LXR -> reassign
Assignee: attinasi → evaughan
(Assignee)

Comment 2

16 years ago
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
(Reporter)

Comment 3

16 years ago
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.
Created attachment 151084 [details] [diff] [review]
make it #ifdef DEBUG_LAYOUT
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
Last Resolved: 14 years ago
Resolution: --- → FIXED

Updated

10 years ago
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.