Can we do some sort of sharing across <style> in different instantiations of a shadow DOM component?
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox70 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: emilio)
References
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
Updated•8 years ago
|
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
| Assignee | ||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
| Assignee | ||
Comment 5•7 years ago
|
||
| Assignee | ||
Comment 6•7 years ago
|
||
A bit of research shows that Blink and WebKit do have such a cache, and sites are probably slower than they need in Firefox because of it.
So I'll do something here...
| Assignee | ||
Comment 7•7 years ago
|
||
Supporting @import was much more annoying (I had a patch but it became much more
complex than this), and seems other browsers don't do it either:
https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/style_sheet_contents.cc?l=149&rcl=1999822baf4dc673088e65997fa07ad158f2e166
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/css/StyleSheetContents.cpp?rev=246490#L111
Also added a singleton perf test for <link> caching.
Maybe we should add some cache eviction here, but I'm not sure what'd be the
best policy here.
Comment 8•7 years ago
|
||
Maybe we should evict entries that never get a second user, after some timer fires?
| Assignee | ||
Comment 9•7 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #8)
Maybe we should evict entries that never get a second user, after some timer fires?
I'll add some code to measure memory usage of this cache and if we see it show up we can think about eviction harder. A timer seems tricky, because it seems plausible for a page to create multiple components across time...
| Assignee | ||
Comment 10•7 years ago
|
||
| Reporter | ||
Comment 11•7 years ago
|
||
You could use an expiration tracker, maybe. Though guessing its tick interval would be nontrivial.
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f47314ec33ff
https://hg.mozilla.org/mozilla-central/rev/ff3ba7a16c21
Comment 14•6 years ago
|
||
Backed out 2 changesets for causing talos perf reftest to timeout in link-style-cache-1.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/a232c8fd289f6a26bce04fdcf82e25e763098722
Push with failures:
(central, where it first appeared): https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&group_state=expanded&searchStr=%28ps%29%2Cwindows%2C7&fromchange=5d4cbfe103bbc517599231eb33d4f3ebbbcede40&selectedJob=262103626
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=262115079&repo=autoland&lineNumber=1236
[task 2019-08-17T00:56:41.568Z] 00:56:41 INFO - PID 4896 | Cycle 1(3): loaded http://127.0.0.1:49777/tests/perf-reftest-singletons/inline-style-cache-1.html (next: http://127.0.0.1:49777/tests/perf-reftest-singletons/link-style-cache-1.html)
[task 2019-08-17T00:56:46.822Z] 00:56:46 INFO - PID 4896 | Cycle 1(4): loaded http://127.0.0.1:49777/tests/perf-reftest-singletons/inline-style-cache-1.html (next: http://127.0.0.1:49777/tests/perf-reftest-singletons/link-style-cache-1.html)
[task 2019-08-17T00:57:17.374Z] 00:57:17 INFO - PID 4896 | __WARNTimeout (1/3) exceeded on http://127.0.0.1:49777/tests/perf-reftest-singletons/inline-style-cache-1.html__WARN
[task 2019-08-17T00:57:47.629Z] 00:57:47 INFO - PID 4896 | __WARNTimeout (2/3) exceeded on http://127.0.0.1:49777/tests/perf-reftest-singletons/inline-style-cache-1.html__WARN
[task 2019-08-17T00:58:17.880Z] 00:58:17 INFO - PID 4896 | __FAILTimeout in perf-reftest-singletons__FAIL
[task 2019-08-17T00:58:17.880Z] 00:58:17 INFO - PID 4896 | __FAILTimeout (3/3) exceeded on http://127.0.0.1:49777/tests/perf-reftest-singletons/inline-style-cache-1.html__FAIL
[task 2019-08-17T00:58:17.880Z] 00:58:17 INFO - PID 4896 | console.error: "You should not call finishTest without having first initted the Profiler"
[taskcluster:error] Aborting task...
Updated•6 years ago
|
Updated•6 years ago
|
Comment 15•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Comment 16•6 years ago
|
||
Backed out 2 changesets (bug 1480146) for causing inline-style-cache-1.html timeouts
backout: https://hg.mozilla.org/integration/autoland/rev/99fd896a682f5d4ce4dc1766f157d22eb6f1e94e
Comment 17•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Comment 18•6 years ago
|
||
Comment 19•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f7dea9580758
https://hg.mozilla.org/mozilla-central/rev/a0d4d643bce2
https://hg.mozilla.org/mozilla-central/rev/455228c96302
Comment 20•6 years ago
|
||
(In reply to Andrei Ciure[:andrei_ciure] from comment #16)
Backed out 2 changesets (bug 1480146) for causing inline-style-cache-1.html timeouts
backout: https://hg.mozilla.org/integration/autoland/rev/99fd896a682f5d4ce4dc1766f157d22eb6f1e94e
== Change summary for alert #22522 (as of Sun, 18 Aug 2019 19:12:45 GMT) ==
Improvements:
29% perf_reftest_singletons windows10-64-shippable opt e10s stylo 66.62 -> 47.58
28% perf_reftest_singletons windows10-64-shippable-qr opt e10s stylo 67.04 -> 48.43
27% perf_reftest_singletons linux64-shippable opt e10s stylo 63.13 -> 46.05
27% perf_reftest_singletons linux64-shippable-qr opt e10s stylo 65.99 -> 48.35
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=22522
Comment 21•6 years ago
|
||
Alexandru, are these performance improvements as a result of backing out the initial landing? Were there corresponding regressions in those tests when they initially landed (and when they re-landed)?
Comment 23•6 years ago
|
||
I've documented this one; see https://github.com/mdn/sprints/issues/2117#issuecomment-530808053 for the full details.
I'm not 100% sure my wording is correct, so a review would be really appreciated, thanks!
Description
•