remove Service Worker Cache "prefixMatch" option

RESOLVED FIXED in Firefox 39

Status

()

defect
RESOLVED FIXED
4 years ago
a month ago

People

(Reporter: bkelly, Assigned: Ehsan)

Tracking

(Blocks 1 bug)

unspecified
mozilla39
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox39 fixed)

Details

(URL)

Attachments

(1 attachment)

See:

  https://github.com/slightlyoff/ServiceWorker/issues/617

Implementing prefixMatch is hard to do efficiently without indexing a potentially large TEXT column in the sqlite database.  Its even harder when you throw in ignoreSearch.

The blink team agrees (and they haven't implemented it yet), so everyone seems in favor of simplifying and removing prefixMatch.
(Reporter)

Updated

4 years ago
Blocks: 1110458
(Assignee)

Updated

4 years ago
Assignee: nobody → ehsan
(Assignee)

Comment 1

4 years ago
Requesting review from baku on the WebIDL change.
Attachment #8573537 - Flags: review?(bkelly)
(Assignee)

Comment 2

4 years ago
(Note that I didn't change the schema to avoid stepping on Ben's toes.)
Comment on attachment 8573537 [details] [diff] [review]
Remove support for the prefixMatch option in the service worker cache code

Review of attachment 8573537 [details] [diff] [review]:
-----------------------------------------------------------------

Wow, I could have sworn I had a test that used prefixMatch.  But I guess I don't. :-\

> (Note that I didn't change the schema to avoid stepping on Ben's toes.)

Yea, before we remove the URL indices I need to write code to hash the URL for exact matching.  That's going to be a ton easier with prefix matching removed.

Thanks for doing this.
Attachment #8573537 - Flags: review?(bkelly) → review+
(Assignee)

Updated

4 years ago
Attachment #8573537 - Flags: review?(amarchesini)
Comment on attachment 8573537 [details] [diff] [review]
Remove support for the prefixMatch option in the service worker cache code

Review of attachment 8573537 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/cache/DBSchema.cpp
@@ +676,5 @@
>      urlToMatch = aRequest.url();
>      query.AppendLiteral("request_url");
>    }
>  
> +  query.AppendLiteral(" =?2 GROUP BY entries.id ORDER BY entries.id;");

extra space before '='
Attachment #8573537 - Flags: review?(amarchesini) → review+
https://hg.mozilla.org/mozilla-central/rev/43d4db7da2d6
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.