Move v2 personalization into promise worker
Categories
(Firefox :: New Tab Page, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | verified |
People
(Reporter: thecount, Assigned: thecount)
References
Details
Attachments
(1 file, 1 obsolete file)
The current state of v2 personalization is still doing quite a bit of JavaScript on the main thread.
This feature is preffed off, and in order to pref it on, we need to move it off the main thread.
We do this by moving it into a promise worker.
https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/PromiseWorker.jsm
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
•
|
||
To test:
- Create a brand new profile
- Set
browser.newtabpage.activity-stream.asrouter.devtoolsEnabled
to true - Open about:newtab#devtools-ds
- Ensure "show_spocs" is checked
- Scroll down a bit and click "Enable V2 Personalization"
- Scroll up and click "Trigger Idle Daily"
- You should now have all the attachments from remote settings downloaded.
- Scroll up and click "Expire Cache"
- Scroll up and click "Trigger System Tick"
- refresh the browser.
- Look for a spoc under "spoc data" and click "collapse/open" on any of those spocs.
Expected:
Look for score
to be different from item_score
this is the easiest way to verify atm.
Pushed by sdowne@getpocket.com: https://hg.mozilla.org/integration/autoland/rev/ed840ec54b16 Move v2 personalization into promise worker. r=gvn,jonathankoren,mconley
Comment 5•4 years ago
|
||
bugherder |
Comment 6•4 years ago
|
||
I have verified this, using the above steps, on Firefox Nighlty 76.0a1 (Build ID 20200329214909) and obtained the following results:
- clicking on the "Trigger Idle Daily" button => no changes, at least on the visual side; same for "Expire cache" and "Trigger System Tick";
- refresh was made using both "F5" key and "Refresh Cache" from about:newtab#devtools-ds ;
- only 1 row with data is displayed in the "Spoc data" section - clicking on the "collapse/open" button will show same results for "score" and "item_score";
Is this the expected behavior, to have two different fields: score and item_score with same value or each field to have different values?
Please let me know if I am missing something out. Thanks!
I've also set the bellow prefs:
- "browser.search.region" to "US"
- "browser.newtabpage.activity-stream.discoverystream.spocs-endpoint" to " https://spocs.getpocket.com/spocs?site=1116390&country=US®ion=US-CA"
Assignee | ||
Comment 7•4 years ago
|
||
The values in score and item_score should be different, and yes, you should see both.
I think the reason they are the same is because I suspect in step 10 you refreshed the cache, which would refresh the score too. I updated step 10 to be more clear, so it doesn't get confused with refresh cache.
Hope that helps!
Comment 8•4 years ago
|
||
Verified that this was implemented on Firefox Nightly 76.0a1 (Build ID 20200330220101) using Windows 10, Linux Ubuntu 18.04 and Mac 10.15.
The "score" and "item_score" fields are available and have different values.
Updated•4 years ago
|
Description
•