Closed Bug 757467 Opened 12 years ago Closed 12 years ago

Excessive getItems requests when switching days

Categories

(Calendar :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: mmecca)

References

Details

(Keywords: perf)

Attachments

(1 file, 2 obsolete files)

Attached patch WiP - v1 (obsolete) β€” β€” Splinter Review
Due to the filtering activity, the event trees are refreshed quite a lot. Specifically, just switching to a different day in the calendar view will cause a refresh, I have pinpointed two locations for this:


The if() condition is always true here, wrong use of ||
> http://hg.mozilla.org/comm-central/annotate/499441818d84/calendar/base/content/calendar-unifinder.js#l322

updateFilter() always refreshes, even if the filter hasn't changed:
> http://hg.mozilla.org/comm-central/annotate/499441818d84/calendar/base/content/calendar-task-tree.xml#l1297

Matthew, since you wrote most of the filter code you probably have a better overview. Could you check that I am doing the right thing in the attached patch and possibly find other locations where we are doing too many refreshes?

The main problem with so many refreshes is that each does a getItems call on the provider, which means excessive network requests if the provider is uncached. I noticed this while removing e4x from the gdata provider.
Attachment #626033 - Flags: review?(matthew.mecca)
Attached patch Fix v2 (obsolete) β€” β€” Splinter Review
I think we should do this after Bug 745081, the calFilter change won't be necessary, and we won't have to hard code the filter values.
Assignee: nobody → matthew.mecca
Attachment #626033 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #626033 - Flags: review?(matthew.mecca)
Attachment #626319 - Flags: review?(philipp)
Depends on: 745081
Attached patch Fix v3 β€” β€” Splinter Review
Attachment #626319 - Attachment is obsolete: true
Attachment #626319 - Flags: review?(philipp)
Attachment #626321 - Flags: review?(philipp)
Comment on attachment 626321 [details] [diff] [review]
Fix v3

r=philipp
Attachment #626321 - Flags: review?(philipp) → review+
Pushed to comm-central - http://hg.mozilla.org/comm-central/rev/3301cdb8b397
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.7
Blocks: 702886
Blocks: 753297
Keywords: perf
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: