All users were logged out of Bugzilla on October 13th, 2018

further reduce refcounting of atoms

ASSIGNED
Assigned to

Status

()

P4
normal
ASSIGNED
17 years ago
9 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

({perf})

Trunk
Future
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

The fix for bug 92141 greatly reduced the (threadsafe, and thus expensive)
refcounting of atoms by using a permanent atom implementation for all the atoms
in the atom lists.  However, there are probably a few other key places where we
could use permanent atoms for additional performance gain.

A profile of ibench with that fix should that the top places where we AddRef
atoms are (by timer counts):

                 11 nsFontMetricsGTK::GetLangGroup(nsIAtom**)
                  7 nsLanguageAtom::GetLanguageGroup(nsIAtom**)
                  3 nsNodeInfo::GetNameAtom(nsIAtom*&)
                  1 nsTextFrame::TextStyle::TextStyle(nsIPresContext*, etc.)
                  1 nsNodeInfoManager::GetNodeInfo(nsAString const&, etc.)
                  1 nsXULAttribute::GetValueAsAtom(nsIAtom**)
                  1 AtomKey::AtomKey(AtomKey_base const&)
                  1 NS_NewAtom(unsigned short const*)
                  1 NS_NewAtom(nsAString const&)
                  1 nsFontCache::GetMetricsFor(nsFont const&, nsIAtom*, etc.)

The places where we release atoms are similar.

Three of these hits are associated with CSS classes (the three hard-to-attribute
ones), a few with XUL attribute values, a few are associated with other things,
but many are associated with language groups and fonts.
Keywords: perf
There are also some very commonly used attribute values, such as "true", that
are not in any atom list.  Probably some attribute names, like "hidden" or
"collapsed" (one of them -- I forget which) as well.
Status: NEW → ASSIGNED

Comment 2

17 years ago
Not sure what does this bug really mean. Can you put a simple step-by-step
change here. 
Priority: -- → P4
Target Milestone: --- → Future
QA Contact: chrispetersen → layout
You need to log in before you can comment on or make changes to this bug.