Closed
Bug 265457
Opened 20 years ago
Closed 20 years ago
GetEventsForRange is inefficient
Categories
(Calendar :: Internal Components, defect)
Calendar
Internal Components
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mvl, Assigned: mvl)
References
Details
Attachments
(2 files)
4.24 KB,
patch
|
mostafah
:
first-review+
|
Details | Diff | Splinter Review |
4.86 KB,
patch
|
mostafah
:
first-review+
|
Details | Diff | Splinter Review |
The way GetEventsForRange isn't efficients. It walks the array of items to find
the next occurence of any event, and keeps on doing this. So it lwlks the entire
array quite a few times. It does it this way to get a sorted list. The result is
that it takes quite long.
A better way would be to first walk the event to get all the occurences in the
time range, then sort it.
Assignee | ||
Comment 1•20 years ago
|
||
Patch to do it. In a quick test, the function was about 25x as fast as before.
Patch depends on the patch in bug 262620. Not because it is really needed, but
because i didn't want to bitrot my own patches.
Assignee | ||
Comment 2•20 years ago
|
||
Comment on attachment 162865 [details] [diff] [review]
patch v1
side note: i want to turn the eventOccurence class into oeICalEventOccurence
when that is ready. (guess how i found the inefficient code :) )
Attachment #162865 -
Flags: first-review?(mostafah)
Assignee | ||
Comment 3•20 years ago
|
||
Ofcourse, we can do the same for GetFirstEventsForRange(), which is used for
the list of events.
Assignee | ||
Updated•20 years ago
|
Attachment #162881 -
Flags: first-review?(mostafah)
Comment 4•20 years ago
|
||
Comment on attachment 162865 [details] [diff] [review]
patch v1
Patch checked in, after fixing indents.
Attachment #162865 -
Flags: first-review?(mostafah) → first-review+
Comment 5•20 years ago
|
||
Comment on attachment 162881 [details] [diff] [review]
same for GetFirstEventsForRange
Patch checked in, after fixing indents
Attachment #162881 -
Flags: first-review?(mostafah) → first-review+
Comment 6•20 years ago
|
||
Fixed in CVS. Thanks for the great work mvl
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 7•19 years ago
|
||
Mass move of libxpical bugs to the Internal Components, per ctalbert.
Component: libxpical → Internal Components
Comment 8•19 years ago
|
||
The bugspam monkeys have been set free and are feeding on Calendar :: Internal Components. Be afraid for your sanity!
QA Contact: gurganbl → base
You need to log in
before you can comment on or make changes to this bug.
Description
•