Adds nsHttp::No_Vary_Search atom for the No-Vary-Search response header.
When nsHttpChannel::UpdateCacheEntryHeaders() processes a response that
carries a No-Vary-Search header, it:
1. Stores the raw header value as "no-vary-search" cache entry metadata
via SetMetaDataElement.
2. Calls CacheStorageService::NoteNoVarySearchEntry() to register the
entry in the per-context mNoVarySearchIndex under its base path
(scheme://host:port/path), enabling O(1) secondary lookup on future
cache misses for variant URLs.
CacheStorageService::NoteNoVarySearchEntry() acquires sLock and forwards
to the right CacheEntryTable::NoteNoVarySearchEntry().
Differential Revision: https://phabricator.services.mozilla.com/D299715
The callsites now mostly use MakeAndAddRef (which just stuffs a new object into
a RefPtr and calls `forget()` to yield an already_AddRefed).
In cases where the callsite constructs the object earlier and retains a strong
reference, they'll now use do_AddRef to explicitly generate a strong reference
(as an already_AddRefed) to pass into RegisterStrongMemoryReporter.
Differential Revision: https://phabricator.services.mozilla.com/D299042
This reverts commit 1ab110ab2f.
Revert "Bug 2037761: Change RegisterStrongMemoryReporter to take already_AddRefed instead of a raw pointer, and update callsites. r=dom-core,smaug"
This reverts commit 2e187ddbc8.
The callsites now mostly use MakeAndAddRef (which just stuffs a new object into
a RefPtr and calls `forget()` to yield an already_AddRefed).
In cases where the callsite constructs the object earlier and retains a strong
reference, they'll now use do_AddRef to explicitly generate a strong reference
(as an already_AddRefed) to pass into RegisterStrongMemoryReporter.
Differential Revision: https://phabricator.services.mozilla.com/D299042
This is a large number of largely mechanical changes. When possible, the code
was called to directly call `.get()` instead, performing the assertions
manually. In many places PromiseFlatCString() calls were added to dynamically
copy the strings into null terminated buffers if the string was not null
terminated.
Differential Revision: https://phabricator.services.mozilla.com/D286158
The network predictor used the HTTP cache as a database to learn browsing
patterns and make speculative DNS prefetches, TCP preconnects, and resource
prefetches. While this provided performance benefits for repeat visits to
frequently-accessed sites, it came with significant costs: I/O on every page
load, CPU overhead for prediction algorithms, memory for caching learned
patterns, and substantial IPC complexity with six message types coordinating
predictions between processes.
A large part of the functionality the predictor was meant to improve is now
available to webdevelopers. HTTP 103 Early Hints allow servers to explicitly
specify resources to preload while generating the response.
And Speculation Rules API will enable content authors to declaratively specify
prefetch/prerender behavior based on their knowledge of site structure and user
intent, providing immediate accuracy without a learning period.
The network.predictor.enable-hover-on-ssl preference is retained as it controls
simpler hover-triggered speculative connections that don't require the
predictor's learning system. This removal simplifies the codebase while
steering users toward more accurate, standards-based optimization mechanisms.
The one feature of the predictor which was never used was learning websites
that are opened soon after startup. There was no action taken based on this
info, and we could already predict this info based on the history database.
Differential Revision: https://phabricator.services.mozilla.com/D276437
The network predictor used the HTTP cache as a database to learn browsing
patterns and make speculative DNS prefetches, TCP preconnects, and resource
prefetches. While this provided performance benefits for repeat visits to
frequently-accessed sites, it came with significant costs: I/O on every page
load, CPU overhead for prediction algorithms, memory for caching learned
patterns, and substantial IPC complexity with six message types coordinating
predictions between processes.
A large part of the functionality the predictor was meant to improve is now
available to webdevelopers. HTTP 103 Early Hints allow servers to explicitly
specify resources to preload while generating the response.
And Speculation Rules API will enable content authors to declaratively specify
prefetch/prerender behavior based on their knowledge of site structure and user
intent, providing immediate accuracy without a learning period.
The network.predictor.enable-hover-on-ssl preference is retained as it controls
simpler hover-triggered speculative connections that don't require the
predictor's learning system. This removal simplifies the codebase while
steering users toward more accurate, standards-based optimization mechanisms.
The one feature of the predictor which was never used was learning websites
that are opened soon after startup. There was no action taken based on this
info, and we could already predict this info based on the history database.
Differential Revision: https://phabricator.services.mozilla.com/D276437
This also fails the request at an earlier point; it would (probably) failed later on decompression.
It adds new testing APIs to allow this to be easily tested.
Differential Revision: https://phabricator.services.mozilla.com/D276397
To minimized performance impact and as general data best practices, let's remove or limit the channel collection for probes for which we are not currently deriving much value.
Differential Revision: https://phabricator.services.mozilla.com/D273112
To minimized performance impact and as general data best practices, let's remove or limit the channel collection for probes for which we are not currently deriving much value.
Differential Revision: https://phabricator.services.mozilla.com/D273112
To minimized performance impact and as general data best practices, let's remove or limit the channel collection for probes for which we are not currently deriving much value.
Differential Revision: https://phabricator.services.mozilla.com/D273112
Introduces a new cache entry type to ease eviction scan. Makes dictionary
origin removal depend directly on the origin being empty.
Also fix an issue with RemoveOrigin()
Differential Revision: https://phabricator.services.mozilla.com/D270169
Also adds an explict path for deleting dictionary origin entries, so we
don't have empty DictionaryOrigin objects hanging around.
Differential Revision: https://phabricator.services.mozilla.com/D270002
This reverts commit c5da1f9e6d.
Revert "Bug 1996560: Clear from dictionary cache on file removal, not metadata removal r=necko-reviewers,valentin"
This reverts commit 17d6947e95.
Revert "Bug 1996305: Ensure Suspend() is called before starting async dictionary origin reads r=necko-reviewers,valentin"
This reverts commit 10a3b59015.
Revert "Bug 1996298: PurgeByFrecency was over-purging due to holding references r=necko-reviewers,jstutte,valentin" for causing bug 1996848, 1996764 and increase volume of bug 1994773
This reverts commit 3d93084ce3.
Also adds an explict path for deleting dictionary origin entries, so we
don't have empty DictionaryOrigin objects hanging around.
Differential Revision: https://phabricator.services.mozilla.com/D270002
This reverts commit 9b1999e251.
Revert "Bug 1996298: PurgeByFrecency was over-purging due to holding references r=jstutte"
This reverts commit 37189355ec.
Also adds an explict path for deleting dictionary origin entries, so we
don't have empty DictionaryOrigin objects hanging around.
Differential Revision: https://phabricator.services.mozilla.com/D270002
Don't purge the metadata-only dictionary origin cache entries; when the
entries they refer to are deleted, the reference in the dictionary origin
cache entry will be removed
Differential Revision: https://phabricator.services.mozilla.com/D269559
Don't purge the metadata-only dictionary origin cache entries; when the
entries they refer to are deleted, the reference in the dictionary origin
cache entry will be removed
Differential Revision: https://phabricator.services.mozilla.com/D269559
This reverts commit 26c4a68ff7.
Revert "Bug 1978495: Make clear-site-data synchronous r=necko-reviewers,valentin"
This reverts commit 19e809294c.
Revert "Bug 1917965: Bug Fix for AddStandardHeaders and an await in TRR r=necko-reviewers,valentin"
This reverts commit 4c4a17eaeb.
Revert "Bug 1984198: Fix for ipv6 clear by principal for Compression Dictionaries r=edgul"
This reverts commit da9fc176ae.
Revert "Bug 1917970: Update handling of removing encodings for CompressionDictionaries r=necko-reviewers,valentin,kershaw"
This reverts commit 4c73126208.
Revert "Bug 1978496: Add markers for Compression Dictionaries #necko-reviewers! r=necko-reviewers,valentin"
This reverts commit d7cb9a5e0b.
Revert "Bug 1917974: Move CompressionDictionaries AddAcceptAndDictionaryHeaders to run earlier r=necko-reviewers,kershaw,devtools-reviewers,bomsy"
This reverts commit df63d60f8f.
Revert "Bug 1917965: Update cache listener changes to ensure data is cached in compressed form r=necko-reviewers,kershaw"
This reverts commit 46c6d977d7.
Revert "Bug 1917970: only remove dcb and dcz Content-Encodings r=necko-reviewers,kershaw"
This reverts commit bc645c1e24.
Revert "Bug 1988076: Shutdown cleanup issues for Compression Dictionaries r=necko-reviewers,valentin"
This reverts commit 22c04bad81.
Revert "Bug 1918741: Add unit tests for Compression Dictionaries r=necko-reviewers,kershaw,valentin"
This reverts commit b09a89245a.
Revert "Bug 1917974: Clean up call to GetDictionaryFor() r=valentin,necko-reviewers"
This reverts commit b4d8ad3a34.
Revert "Bug 1917965: Minor Compression Dictionary cleanup r=necko-reviewers,valentin"
This reverts commit 9ef82139ca.
Revert "Bug 1978496: Add more logs for Compression Dictionaries r=necko-reviewers,valentin"
This reverts commit a85f97ac8c.
Revert "Bug 1984157: Vary support for Compression Dictionaries r=necko-reviewers,valentin"
This reverts commit 780bddc945.
Revert "Bug 1917965: Add design doc r=necko-reviewers,kershaw"
This reverts commit cf09ea9257.
Revert "Bug 1979087: Use URLPattern for matching Compression Dictionary entries r=edgul,necko-reviewers,kershaw"
This reverts commit 69720d6199.
Revert "Bug 1978494: Fix GetOriginalHeader to account for new header type r=necko-reviewers,valentin"
This reverts commit 0939a45626.
Revert "Bug 1978494: Don't use stale dictionaries, more logs, improve handling of dictionary origin reading r=necko-reviewers,valentin"
This reverts commit a2c00deb4d.
Revert "Bug 1917976: Compression Dictionary match-dest support r=necko-reviewers,valentin,kershaw"
This reverts commit bf874cae0d.
Revert "Bug 1950965: about:cache support for Compression Dictionaries and cleanup r=necko-reviewers,valentin"
This reverts commit 115be236bf.
Revert "Bug 1978495: Compression Dictionaries clear-site and clear cookies support r=necko-reviewers,valentin"
This reverts commit 62d7f7168e.
Revert "Bug 1917974: Add OPEN_COMPLETE_ONLY and use it for Compression Dictionary Prefetch r=necko-reviewers,valentin"
This reverts commit 5076f7a779.
Revert "Bug 1917974: Hook in Prefetching of cache entries for Compression Dictionaries r=necko-reviewers,valentin"
This reverts commit 77f0cd1912.
Revert "Bug 1949981: Add code to clear Compression Dictionary entries r=necko-reviewers,valentin"
This reverts commit 515eb81e07.
Revert "Bug 1978494: Read and write of per-origin compression dictionary cache entries/metadata r=necko-reviewers,valentin"
This reverts commit 32fb24708c.
Revert "Bug 1950972: Allow changing Content-Encoding header when we decompress for cache storage r=necko-reviewers,valentin"
This reverts commit c7c5e2b800.
Revert "Bug 1917974: Add OnCacheEntryCallbacks for Compression Dictionaries r=necko-reviewers,valentin"
This reverts commit e599730050.
Revert "Bug 1917974: Make GetDictionaryFor async since we need to query the cache r=necko-reviewers,valentin"
This reverts commit 33cb96b72f.
Revert "Bug 1917975: Compression Dictionary initial metadata parsing r=necko-reviewers,valentin"
This reverts commit 2f04f4d43c.
Revert "Bug 1917975: Read dictionaries from cache for Compression Dictionaries r=necko-reviewers,valentin"
This reverts commit 23e72a7efc.
Revert "Bug 1918013: Compression Dictionaries link rel= support r=smaug,necko-reviewers,kershaw"
This reverts commit f45f89e188.
Revert "Bug 1975014: Add a pref for Compression Dictionaries r=necko-reviewers,kershaw"
This reverts commit 0042928354.
Revert "Bug 1978496: Add logs for CompressionDictionaries r=necko-reviewers,sunil,kershaw"
This reverts commit 15dec18026.
Revert "Bug 1917970: Support decoding brotli & zstd dictionary-encoded streams r=necko-reviewers,valentin"
This reverts commit 3dfc96583b.
Revert "Bug 1917965: Add support for dcb and dcz content-encoding r=necko-reviewers,valentin"
This reverts commit fec1a197f4.
Revert "Bug 1917974: Accumulate Dictionary hash values r=necko-reviewers,sunil"
This reverts commit 5cdbe885bc.
Revert "Bug 1917982: Support use_as_dictionary response headers r=necko-reviewers,kershaw"
This reverts commit 642c049998.
Revert "Bug 1917965: Add initial Dictionary in-memory structures r=necko-reviewers,kershaw"
This reverts commit 19ab2d5af8.
Revert "Bug 1917963: Add Cache flags for Compression Dictionaries r=necko-reviewers,kershaw"
This reverts commit e31fee5400.
Revert "Bug 1917963: Break out adding Accept-Encoding headers r=necko-reviewers,sunil,kershaw"
This reverts commit 93bd84a618.
Revert "Bug 1918741: Change Compression Dictionary WPTs to assume pass r=necko-reviewers,kershaw"
This reverts commit e83caa2c66.
Revert "Bug 1975024: Cleanup Cache code and locks in prep for Compression Dictionaries #necko-reviewers r=necko-reviewers,kershaw"
This reverts commit 5dd4896f18.