Closed Bug 326116 Opened 18 years ago Closed 18 years ago

Check etag when downloading


(Calendar :: Internal Components, defect)

Not set


(Not tracked)



(Reporter: mvl, Assigned: mvl)




(1 file, 2 obsolete files)

Should check the etag when downloading, so that we can detect if there have been any remote changes. If there were no changes, we can skip the parsing step.
Attached patch patch v1 (obsolete) — Splinter Review
patch should do the trick.
It will be a performance improvement on refresh, and is needed for doing timed reload, te keep some performance.
Attachment #210903 - Flags: first-review?(dmose)
Blocks: 315511
Attachment #210903 - Attachment is obsolete: true
Attachment #214110 - Flags: first-review?(dmose)
Attachment #210903 - Flags: first-review?(dmose)
Comment on attachment 214110 [details] [diff] [review]
patch, v2 updated to not conflict with the trunk

>     onStreamComplete: function(loader, ctxt, status, resultLength, result)
>     {
>         // Allow the hook to get needed data (like an etag) of the channel
>-        this.mHooks.onAfterGet();
>+        var cont = this.mHooks.onAfterGet();
>+        if (!cont)
>+            return;

If we just return like this, won't we fail to call onLoad(), set the locked attribute, and process the queue?
I created an unlock function, that does the cleanup. Also moved the check for the empty string somewhat earlier in the function.
For symmetry, added a lock and isLocked function.
Attachment #214110 - Attachment is obsolete: true
Attachment #214115 - Flags: first-review?
Attachment #214110 - Flags: first-review?(dmose)
Comment on attachment 214115 [details] [diff] [review]
patch v3, updated to review comment

r=dmose with s/cleanupLoading/unlock//.
Attachment #214115 - Flags: first-review? → first-review+
Updated version of v3 patch landed; thanks for the patch, Michiel!
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.