Closed
Bug 13201
Opened 25 years ago
Closed 25 years ago
use nsIAtoms or nsAutoStrings in nsXULKeyListener
Categories
(Core :: XUL, defect, P1)
Core
XUL
Tracking
()
VERIFIED
FIXED
M11
People
(Reporter: waterson, Assigned: saari)
References
()
Details
I haven't profiled any of the editor/keytyping stuff, but code in
nsXULKeyListener seems like an obvious candidate for replacing nsString usage
with nsIAtoms (or at worst, nsAutoStrings for automatic variables).
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M11
Assignee | ||
Comment 1•25 years ago
|
||
Actually, I'm replacing most of that string crap with booleans.
What is the advantage to an nsIAtom?
Reporter | ||
Comment 2•25 years ago
|
||
An "atom" is a string that has been hashed to a unique value. Everytime you ask
for the same string, you get back the same atom. So, this is a big win if you
do a lot of string comparison: you can atomize the stings you routinely compare
against, and do a single pointer compare with "==" instead of a strcmp().
Assignee | ||
Comment 3•25 years ago
|
||
Oh, it is a flyweight.
Why must we think of new names for everything?
Reporter | ||
Comment 4•25 years ago
|
||
Atom tables have been around since people started writing compiles, methinks.
:-)
Assignee | ||
Comment 5•25 years ago
|
||
Eh... OK. You win.
Comment 6•25 years ago
|
||
Regardless of how long the term "atom" has been in use (quite a while, not that
it matters), for things like "true" and "false" it makes sense just to convert
to booleans inside the key listener code (though it wouldn't hurt to use atoms
for those boolean values when initially parsing the code). No particular reason
to store atoms representing a string when all it does is codify a boolean value
...
Assignee | ||
Comment 7•25 years ago
|
||
Booleans are the plan
Assignee | ||
Updated•25 years ago
|
Priority: P3 → P1
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•25 years ago
|
||
Converted to nsAutoStrings, and fewer of them. May go back and make them atoms
later.
Updated•25 years ago
|
QA Contact: ckritzer → waterson
Comment 9•25 years ago
|
||
Assigning to originator per new organizational structure.
Updated•25 years ago
|
QA Contact: waterson → ckritzer
Comment 10•25 years ago
|
||
Changing QA Contact back to ckritzer@netscape.com
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
QA Contact: ckritzer → paulmac
Comment 11•25 years ago
|
||
marking verified
Comment 12•25 years ago
|
||
BULK MOVE: Changing component from XUL to XP Toolkit/Widgets: XUL. XUL
component will be deleted.
Component: XUL → XP Toolkit/Widgets: XUL
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: paulmac → xptoolkit.widgets
Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•