Delays Tracking Loads
Categories
(Core :: Networking, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: xeonchen, Assigned: xeonchen)
References
()
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
mayhemer
:
feedback+
pascalc
:
approval-mozilla-beta-
|
Details | Review |
Create a preference that delays tracking loads:
network.delay.tracking.load = X microseconds; default is 0.
When this is set, loads associated with channels that load third party data (not the top level document) and are tagged as trackers will be delayed by X microseconds. “Delay” means that the request will not hit the network until the browser waits X microseconds.
Assignee | ||
Comment 1•6 years ago
|
||
Hi Honza, I have a feeling that this is a little bit similar to (or potentially partly included in) the tailing mechanism, but I'm not 100% sure. Could you give some comment before I start a new patch on this? Thanks.
Comment 2•6 years ago
|
||
Attach a link to the technical document "Telemetry and prefs related to proxying data."
Comment 3•6 years ago
|
||
What is the exact motivation and intention for creating something like that you propose?
Tailing adds a delay based on heuristic. Tailing mostly stands for a per whole request context (aka whole page) queue. Tailed requests are put at the tail of that queue. They are kept there (not even asyncOpen()'ed) until the networking churn calms. There is a longer delay before domcontentloaded and shorter after it.
Tailing only applies to those requests that we can move around like this:
- async or dynamically added js scripts
- images in the markup
- xhr/fetch and I think element insertion from a tracking script (regardless the target domain, I think)
Delaying css and sync/defer scripts will badly impact performance as those block domcontentloaded.
Updated•6 years ago
|
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #3)
What is the exact motivation and intention for creating something like that you propose?
We're trying to run a study that fetches trackers through proxies.
I think this bug will help us to measure how much user-perspective performance will be impacted if some resources are transferred through a slower network path.
Tanvi, do you have more details about this?
Comment 5•6 years ago
|
||
Aha, so you only want to simulate slow network, OK. It then has nothing to do with tailing, it's way below it. Tailing prevents the whole channel from opening. What you want is to delay the response. There is throttling that devtools is using. Maybe you could reuse that code, if easy to do.
See https://searchfox.org/mozilla-central/source/netwerk/base/ThrottleQueue.h and its use in the net code and devtools
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Comment on attachment 9056038 [details]
Bug 1541238 - add pref to delay 3rd-party tracker;
The delay has to be done before the request is made, so I think we can probably postpone |BeginConnectActual| for the given case?
Updated•6 years ago
|
Comment 9•6 years ago
|
||
bugherder |
Comment 10•6 years ago
|
||
This was only a feedback not a review. Did you meant to push it?
Comment 11•6 years ago
|
||
(In reply to Dragana Damjanovic [:dragana] from comment #10)
This was only a feedback not a review. Did you meant to push it?
sorry, bugzilla did not show me the phabricator before, I do not know why.
Updated•6 years ago
|
Assignee | ||
Comment 12•6 years ago
|
||
Comment on attachment 9056038 [details]
Bug 1541238 - add pref to delay 3rd-party tracker;
Beta/Release Uplift Approval Request
- Feature/Bug causing the regression: N/A
- User impact if declined: No impact, this is used for experiment.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This is default disabled feature.
- String changes made/needed: N/A
Comment 13•6 years ago
|
||
Comment on attachment 9056038 [details]
Bug 1541238 - add pref to delay 3rd-party tracker;
Uplift approved for 67 beta 11, thanks
Comment 14•6 years ago
|
||
bugherder uplift |
Comment 15•6 years ago
|
||
Backed out 4 changesets (Bug 1541238, Bug 1542069, Bug 1533363) for build bustages - missing Bug 1536488
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta&revision=74c650902989c6b30b913c4b20639bf71ba11aef&selectedJob=240336243
Backout link: https://hg.mozilla.org/releases/mozilla-beta/rev/ca196717df0793c823865553b8907cf28573597f
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=240336243&repo=mozilla-beta&lineNumber=13796
[task 2019-04-15T12:55:45.628Z] 12:55:45 INFO - make[5]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/xpconnect/tests/components/native'
[task 2019-04-15T12:55:46.569Z] 12:55:46 INFO - make[5]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/http'
[task 2019-04-15T12:55:46.577Z] 12:55:46 INFO - /builds/worker/workspace/build/src/clang/bin/clang++ -o Unified_cpp_protocol_http2.i_o -c -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/netwerk/protocol/http -I/builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/http -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/extensions/auth -I/builds/worker/workspace/build/src/netwerk/base -I/builds/worker/workspace/build/src/netwerk/cookie -I/builds/worker/workspace/build/src/netwerk/url-classifier -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fcrash-diagnostics-dir=/builds/worker/artifacts -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fomit-frame-pointer -funwind-tables -Werror -fprofile-instr-generate -MD -MP -MF .deps/Unified_cpp_protocol_http2.i_o.pp /builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/http/Unified_cpp_protocol_http2.cpp
[task 2019-04-15T12:55:46.578Z] 12:55:46 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/http/Unified_cpp_protocol_http2.cpp:29:
[task 2019-04-15T12:55:46.580Z] 12:55:46 ERROR - /builds/worker/workspace/build/src/netwerk/protocol/http/nsHttpChannel.cpp:1303:28: error: no member named 'CLASSIFIED_ANY_BASIC_TRACKING' in 'nsIHttpChannel::ClassificationFlags'; did you mean 'CLASSIFIED_ANY_TRACKING'?
[task 2019-04-15T12:55:46.581Z] 12:55:46 INFO - } else if (flags & CF::CLASSIFIED_ANY_BASIC_TRACKING) {
[task 2019-04-15T12:55:46.582Z] 12:55:46 INFO - ^
[task 2019-04-15T12:55:46.582Z] 12:55:46 INFO - CLASSIFIED_ANY_TRACKING
[task 2019-04-15T12:55:46.583Z] 12:55:46 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/nsIHttpChannel.h:200:5: note: 'CLASSIFIED_ANY_TRACKING' declared here
[task 2019-04-15T12:55:46.584Z] 12:55:46 INFO - CLASSIFIED_ANY_TRACKING = 125,
[task 2019-04-15T12:55:46.585Z] 12:55:46 INFO - ^
[task 2019-04-15T12:55:46.586Z] 12:55:46 INFO - 1 error generated.
[task 2019-04-15T12:55:46.587Z] 12:55:46 INFO - /builds/worker/workspace/build/src/config/rules.mk:805: recipe for target 'Unified_cpp_protocol_http2.i_o' failed
[task 2019-04-15T12:55:46.588Z] 12:55:46 ERROR - make[5]: *** [Unified_cpp_protocol_http2.i_o] Error 1
[task 2019-04-15T12:55:46.589Z] 12:55:46 INFO - make[5]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/http'
[task 2019-04-15T12:55:46.591Z] 12:55:46 INFO - make[5]: *** Waiting for unfinished jobs....
[task 2019-04-15T12:55:46.592Z] 12:55:46 INFO - make[5]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/js/xpconnect/src'
Comment 16•6 years ago
|
||
backout bugherder uplift |
Backed out 4 changesets (Bug 1541238, Bug 1542069, Bug 1533363) for build bustages - missing Bug 1536488
https://hg.mozilla.org/releases/mozilla-beta/rev/ca196717df07
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 17•6 years ago
|
||
The uplift plan has been canceled.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Description
•