Excessive getItems requests when switching days

RESOLVED FIXED in 1.7

Status

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Fallen, Assigned: mmecca)

Tracking

({perf})

Dependency tree / graph

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

6 years ago
Created attachment 626033 [details] [diff] [review]
WiP - v1

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)
(Assignee)

Comment 1

6 years ago
Created attachment 626319 [details] [diff] [review]
Fix v2

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)
(Assignee)

Updated

6 years ago
Depends on: 745081
(Assignee)

Comment 2

6 years ago
Created attachment 626321 [details] [diff] [review]
Fix v3
Attachment #626319 - Attachment is obsolete: true
Attachment #626319 - Flags: review?(philipp)
Attachment #626321 - Flags: review?(philipp)
(Reporter)

Comment 3

6 years ago
Comment on attachment 626321 [details] [diff] [review]
Fix v3

r=philipp
Attachment #626321 - Flags: review?(philipp) → review+
(Assignee)

Comment 4

6 years ago
Pushed to comm-central - http://hg.mozilla.org/comm-central/rev/3301cdb8b397
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.7
(Assignee)

Updated

6 years ago
Blocks: 702886
(Assignee)

Updated

6 years ago
Blocks: 753297

Updated

6 years ago
Keywords: perf
You need to log in before you can comment on or make changes to this bug.