Closed Bug 16328 Opened 25 years ago Closed 24 years ago

Too many nsToolkit instances are being created.

Categories

(Core :: XUL, defect, P3)

All
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: rpotts, Assigned: pavlov)

Details

(Keywords: memory-footprint, perf, Whiteboard: [nsbeta3+])

Attachments

(1 file)

Currently, there are too many nsToolkit instances being created.  There should
*only* be one created for each UI thread in the application.

However, they are being created for each window that does not have a parent.
This can be seen on windows by running Spy++ and seeing all of the nsToolkit
windows created for the apprunner...
Assignee: rpotts → beard
I've checked in the code to fix this, however, I've #ifdef'ed it
USE_TLS_FOR_TOOLKIT until the other platforms can be tested...

Currently, the define is enabled *only* for Windows.

Patrick, I'm pushing this bug over to you so you can test the changes on the
Mac.

Once you've turned it on for the Mac, just kick it over to a Unix expert to test
on GTK...

-- rick
Status: NEW → ASSIGNED
I have a fix for this in my tree, at least for the Mac.
Is there any progress on this?  This causes GCs to get leaked on Unix/Gtk.
USE_TLS_FOR_TOOLKIT is now defined in mozilla/widget/macbuild/Widget.prefix
mozilla/widget/macbuild/WidgetDebug.prefix, so that only thread local toolkits 
are being created on the Mac. Reassigning to a UNIX person.
Assignee: beard → pavlov
Status: ASSIGNED → NEW
I have had this on in my tree for months.  This should reduce the number of
instances of nsToolkit we are creating reducing the time we spend mallocing,
etc.
Keywords: nsbeta3, perf
nsbeta3+ for footprint.
Keywords: footprint
Whiteboard: [nsbeta3+]
Attached patch patch to fixSplinter Review
one line makefile change to fix bug.  could someone please review?  only effects
linux.  the code is already in use on windows (and I think mac) and I've had it
on in my tree for a long time.
OS: Windows NT → Linux
That should be DEFINES += -DUSE_TLS_FOR_TOOLKIT
fine, r=cls?
r=cls
fixed
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
just marking VERIFIED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: