Last Comment Bug 307832 - Consider storing the string length in atoms
: Consider storing the string length in atoms
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Nathan Froyd [:froydnj]
Mentors:
Depends on: 307601 534136
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-09 21:41 PDT by Boris Zbarsky [:bz] (still a bit busy)
Modified: 2011-12-12 21:58 PST (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Boris Zbarsky [:bz] (still a bit busy) 2005-09-09 21:41:49 PDT
With bug 307601 fixed (by attachment 172366 [details] [diff] [review]), the single most time consuming
part of nsIAtom::Equals(AString) is the strlen on the atom's char* needed to
create the dependent string.

Would it perhaps make sense to store the string length in atoms so that it can
just be passed in when we create the dependent string?
Comment 1 Boris Zbarsky [:bz] (still a bit busy) 2005-12-28 23:01:46 PST
For that matter, would it make sense to use an nsStringBuffer* instead of a char* in atoms?  That will make all atoms 8 bytes bigger, but maybe that's ok.  I guess since it's a char* buffer, not PRUnichar*, there's not much win to the Unicode ToString from this, though...
Comment 2 Doug Turner (:dougt) 2007-10-08 16:13:41 PDT
mass reassigning to nobody.
Comment 3 Boris Zbarsky [:bz] (still a bit busy) 2010-05-14 20:59:59 PDT
Jonas, didn't bug 534136 just fix all this?
Comment 4 Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-12-12 21:58:42 PST
This was fixed a long time ago

Note You need to log in before you can comment on or make changes to this bug.