Closed
Bug 103451
Opened 23 years ago
Closed 17 years ago
sorting performance: need GetSortKeyLen() and CreateRawSortKey() that take const PRUnichar * to avoid copying
Categories
(MailNews Core :: Backend, defect, P2)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 207634
Future
People
(Reporter: sspitzer, Unassigned)
Details
(Keywords: perf)
need GetSortKeyLen() and CreateRawSortKey() that take const PRUnichar * to
avoid copying
see nsMsgDatabase::CreateCollationKey()
also, it seems like we could fix GetSortKeyLen() and CreateRawSortKey().
GetSortKeyLen() does an allocation and so does CreateRawSortKey()?
why can't we use that allocation for CreateRawSortKey()? maybe create a
CreateRawSortKey() does it all in one go?
also, CreateRawSortKey() copies the string even if it doesn't normalize it.
176 nsAutoString stringNormalized; stringNormalized.Assign(stringIn);
178 if (mCollation != NULL && strength == kCollationCaseInSensitive) {
179 mCollation->NormalizeString(stringNormalized);
180 }
Comment 1•23 years ago
|
||
>need GetSortKeyLen() and CreateRawSortKey() that take const PRUnichar * to
>avoid copying
I saw a bug filed related to this. Cc to bstell, do you know the bug number?
>also, CreateRawSortKey() copies the string even if it doesn't normalize it.
Right, this can be improved.
Summary: sorting performance: need GetSortKeyLen() and CreateRawSortKey() that take const PRUnichar * to avoid copying → sorting performance: need GetSortKeyLen() and CreateRawSortKey() that take const PRUnichar * to avoid copying
Comment 2•23 years ago
|
||
It's bug 103222, changing to use nsAString.
Comment 3•23 years ago
|
||
Adding nsbeta1 nomination because I remember hearing discussion that this would
help a lot.
OS: Windows 2000 → All
QA Contact: esther → stephend
Hardware: PC → All
Comment 4•23 years ago
|
||
I heard nsDependentString does not copy. Can that be used in the mail code?
Updated•23 years ago
|
Comment 6•23 years ago
|
||
If we can get this in 0.9.7 that would be great, but moving to 0.9.8 since it
could wait
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Comment 7•23 years ago
|
||
Using 12-10 code base, Quantify log shows that nsMsgDBView::Sort only takes up
0.03% of the total sorting time (5 msgs, sort by subject):
Function:
nsMsgDBView::Sort
Calls:
1
Function time: 0.38 (0.00% of Focus)
F+D time: 194.64 (0.03% of Focus) (in ms)
Avg F time: 0.38
Min F time: 0.38
Max F time: 0.38
and the number of calls to GetSortKeyLen(), CreateRawSortKey() and PR_malloc()
(space allocation for the keys) is equal to the number of total msgs in the
folder. The time used by them is almost nothing (percentage wide).
Function Name Calls Time (in ms)
nsCollationWin::GetSortKeyLen 5 17.08
nsCollationWin::CreateRawSortKey 5 16.74
PR_Malloc 5 9.01
Same thing for the time spent in windows LCMapStringW() calls:
Function Name Calls Time (in ms)
LCMapStringW 10 28.81
Comment 8•23 years ago
|
||
moving to future based on Quantify data.
Target Milestone: mozilla0.9.8 → Future
Comment 10•23 years ago
|
||
Perhaps you should take a look at bug 149605 and bug 159111.
Would fixing this bug fix those as well ?
Comment 11•22 years ago
|
||
Use of nsDependentString is covered by bug 207634.
Updated•20 years ago
|
Product: MailNews → Core
Comment 12•17 years ago
|
||
with bug 207634 fixed, is there anything worth keeping, considering comment 7?
Assignee: cavin → nobody
QA Contact: stephend → backend
Comment 13•17 years ago
|
||
Yeah, I guess 207634 fixes this after all.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•