Closed Bug 553895 Opened 12 years ago Closed 12 years ago

Add a hashed item array for quick indexing of calendar items

Categories

(Calendar :: Internal Components, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

Details

Attachments

(1 file)

Attached patch Fix - v1 β€” β€” Splinter Review
I've created a sortable hashed array which can be used to improve performance in certain locations (i.e unifinder, month view). I've already done some optimizations with the month view and that looks quite good.
Attachment #433796 - Flags: review?(mschroeder)
Attachment #433796 - Flags: review?(mschroeder) → review?(simon.at.orcl)
Comment on attachment 433796 [details] [diff] [review]
Fix - v1

It looks fine but the O(n) performance on some potentially very common operations could limit its use. 

I think we could look at using a doubled linked list instead of a simple array to avoid most performance problems, a good example is available there (Look at Christoph answer):
http://stackoverflow.com/questions/368280/javascript-hashmap-equivalent
Attachment #433796 - Flags: review?(simon.at.orcl) → review+
I'd like to get this off my list for now, so I'm checking this in. If we decide to use a double linked list in the future, then we can remove or modify the code again. Thanks for the pointer.
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/eaadbd3932e8>
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0b2
You need to log in before you can comment on or make changes to this bug.