Closed
Bug 160140
Opened 23 years ago
Closed 23 years ago
sort in xul treecol does not use locale sensitive sorting
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: ftang, Assigned: janv)
References
Details
Attachments
(1 file, 1 obsolete file)
|
1.23 KB,
patch
|
neil
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
this is spin off from 159188. in 159188 the sort order in treecol does not sort
according to the locale order.
naoki, please work with xul tree owner to fix it and use the sort services
Updated•23 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•23 years ago
|
||
This was probably not correctly copied from the XUL sort service.
I spent some time until I found out it's actually a copy/paste mistake.
Now I know how it works at least :)
| Assignee | ||
Updated•23 years ago
|
Attachment #115087 -
Flags: superreview?(jaggernaut)
Attachment #115087 -
Flags: review?(waterson)
| Assignee | ||
Comment 3•23 years ago
|
||
sigh, this will have noticable performance impact
| Assignee | ||
Updated•23 years ago
|
Attachment #115087 -
Flags: superreview?(jaggernaut)
Attachment #115087 -
Flags: review?(waterson)
| Assignee | ||
Comment 4•23 years ago
|
||
Comment on attachment 115087 [details] [diff] [review]
proposes fix
I've changed my mind, CompareString is expensive, we need to cache sort keys
somehow.
Attachment #115087 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•23 years ago
|
||
I tried to sort a data source with more than 1000 rows (not so big).
Sorting of this data source was noticeable slower, even on my 1.5 Ghz machine.
CompareString has to call GetRawSortKeyLen and CreateRawSortKey every time.
So we end up with many redundant calls to GetRawSortKeyLen and CreateRawSortKey
for the same string.
I think we can "pre-cache" these sort keys using an arena and then call
CompareRawSortKey directly (as we do now).
Chris Waterson says it's a good idea.
| Assignee | ||
Comment 6•23 years ago
|
||
Fix for bug 201670 helped sorting performance a lot (around 300% according to
Neil)
I think we should land this for correctness since XUL sort service use the same
API. I'll also file a new bug about caching sort keys to improve performance
even more.
| Assignee | ||
Updated•23 years ago
|
Attachment #121268 -
Flags: review?(neil)
Comment 7•23 years ago
|
||
Comment on attachment 121268 [details] [diff] [review]
patch
>+ nsDependentString(lstr),
>+ nsDependentString(rstr),
>+ &result);
> }
> else
> result = ::Compare(nsDependentString(lstr),
> nsDependentString(rstr),
Worth sharing those nsDependentStrings?
Attachment #121268 -
Flags: review?(neil) → review+
| Assignee | ||
Updated•23 years ago
|
Attachment #121268 -
Flags: superreview?(jaggernaut)
Comment 8•23 years ago
|
||
Simplified, the code is:
if (foo) {
use1(nsDependentString(foopy));
} else {
use2(nsDependentString(foopy));
}
When run through, only one nsDependentString will be created, so there's no
sharing possible, really. The compiler should even be able to reorder the code
so it'll only generate the constructor (call) asm once, no need for us to do
that IMO.
Comment 9•23 years ago
|
||
Comment on attachment 121268 [details] [diff] [review]
patch
sr=jag (didn't I sr a patch for this a month ago?)
Attachment #121268 -
Flags: superreview?(jaggernaut) → superreview+
| Assignee | ||
Comment 10•23 years ago
|
||
Checked in.
Bug 203007 filed for the perf issue.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•