Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

For #5182: Loading experiments on startup is slow, remove Fretboard!! #7510

Merged
merged 1 commit into from
Jan 13, 2020

Conversation

colintheshots
Copy link
Contributor

@colintheshots colintheshots commented Jan 6, 2020

This removes Fretboard. The goal is to reduce cold startup costs associated with loading the experiments on the main thread. We currently have two experiments frameworks in use and should only require one.

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features

After merge

  • Milestone: Make sure issues finished by this pull request are added to the milestone of the version currently in development.

To download an APK when reviewing a PR:

  1. click on Show All Checks,
  2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
  3. click on the "Fenix - assemble" task, then click "Run Artifacts".
  4. the APK links should be on the left side of the screen, named for each CPU architecture

@codecov-io
Copy link

codecov-io commented Jan 6, 2020

Codecov Report

Merging #7510 into master will decrease coverage by 0.68%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7510      +/-   ##
============================================
- Coverage     19.62%   18.94%   -0.69%     
+ Complexity      469      438      -31     
============================================
  Files           300      297       -3     
  Lines         11531    11367     -164     
  Branches       1561     1532      -29     
============================================
- Hits           2263     2153     -110     
+ Misses         9093     9046      -47     
+ Partials        175      168       -7
Impacted Files Coverage Δ Complexity Δ
app/src/main/java/org/mozilla/fenix/Experiments.kt 0% <ø> (-100%) 0 <0> (-3)
...main/java/org/mozilla/fenix/components/Services.kt 0% <ø> (ø) 0 <0> (ø) ⬇️
...rc/main/java/org/mozilla/fenix/FenixApplication.kt 5.88% <ø> (+0.93%) 2 <0> (ø) ⬇️
...ain/java/org/mozilla/fenix/components/FxaServer.kt 0% <ø> (-100%) 0 <0> (-4)
...in/java/org/mozilla/fenix/search/SearchFragment.kt 0% <ø> (ø) 0 <0> (ø) ⬇️
...a/org/mozilla/fenix/browser/BaseBrowserFragment.kt 0% <ø> (ø) 0 <0> (ø) ⬇️
...org/mozilla/fenix/components/BackgroundServices.kt 20% <ø> (-37.5%) 0 <0> (-4)
...in/java/org/mozilla/fenix/AppRequestInterceptor.kt 56.41% <0%> (ø) 7 <0> (ø) ⬇️
app/src/main/java/org/mozilla/fenix/ext/Context.kt 25% <0%> (-0.93%) 0 <0> (ø)
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 399df17...fb99387. Read the comment docs.

@mcomella mcomella requested review from mcomella and removed request for mcomella January 8, 2020 02:37
@severinrudie severinrudie self-assigned this Jan 8, 2020
Copy link
Contributor

@severinrudie severinrudie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

@@ -64,6 +64,9 @@ fun Context.asFragmentActivity() = (this as? ContextThemeWrapper)?.baseContext a
fun Context.getPreferenceKey(@StringRes resourceId: Int): String =
resources.getString(resourceId)

@Suppress("unused")
fun Context.isInExperiment(@Suppress("UNUSED_PARAMETER") experimentName: String): Boolean = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: would you mind adding a comment along the lines of Feature flags are not supported by Experimentor, we are currently looking into another way to handle them. See {issue number}

app/src/main/java/org/mozilla/fenix/Experiments.kt Outdated Show resolved Hide resolved
@mcomella mcomella self-requested a review January 10, 2020 01:12
@mcomella
Copy link
Contributor

mcomella commented Jan 10, 2020

I'm probably good with Severin's review but adding myself for a quick skim when we've confirmed we're removing it.

@colintheshots
Copy link
Contributor Author

colintheshots commented Jan 10, 2020

I'm probably good with Severin's review but adding myself for a quick skim when we've confirmed we're removing it.

@mcomella We now have acknowledgement from the FxA team to remove it. They asked me to backlog an A-C issue for server-side flags, which I did.

The only open question is if I should remove the isInExperiment function entirely or else add @Deprecated flags and @Suppress flags to the statements that call them.

@colintheshots
Copy link
Contributor Author

@baron-severin and I agreed that it makes more sense to migrate this functionality to FeatureFlags rather than keeping a deprecated isInExperiment method.

Copy link
Contributor

@severinrudie severinrudie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think moving these into FeatureFlags makes sense

@colintheshots
Copy link
Contributor Author

bors r+

@bors
Copy link

bors bot commented Jan 10, 2020

Configuration problem

bors.toml: not found

@colintheshots
Copy link
Contributor Author

How can I get it to re-run the UI tests at this point?

@mcomella mcomella changed the title For #5182: Loading experiments on startup is slow, remove Fretboard For #5182: Loading experiments on startup is slow, remove Fretboard! Jan 10, 2020
@mcomella
Copy link
Contributor

How can I get it to re-run the UI tests at this point?

iirc, we're not using bors so we do the old Focus thing: edit the PR title.

@ekager ekager added the pr:needs-landing PRs that are ready to land [Will be merged by Mergify] label Jan 10, 2020
@mcomella
Copy link
Contributor

Which I already did.

@mcomella
Copy link
Contributor

profile

@mcomella mcomella removed the pr:needs-landing PRs that are ready to land [Will be merged by Mergify] label Jan 10, 2020
@mcomella
Copy link
Contributor

We may want to land this tomorrow to be able to detect a monitor for possible regressions in other PRs in tonight's build.

Copy link
Contributor

@mcomella mcomella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skimmed over and lgtm with Severin's review.

@colintheshots Can we also remove the fretboard (and any other) unused dependencies?

@mcomella mcomella changed the title For #5182: Loading experiments on startup is slow, remove Fretboard! For #5182: Loading experiments on startup is slow, remove Fretboard!! Jan 11, 2020
@mcomella
Copy link
Contributor

CI failure looks like a network error: rerunning.

Note: I did not see any regressions from #7487 (comment) so I'm happy for this to merge. I had wanted to land that potential regression separately from this PR so that any improvements here weren't washed away by a possible known regression.

Reminder from #7510 (review) that we should remove the fretboard dependencies.

…ve Fretboard

This removes Fretboard. The goal is to reduce cold startup costs associated with loading the experiments on the main thread. We currently have two experiments frameworks in use and should only require one.
@colintheshots colintheshots deleted the fix5182 branch January 13, 2020 18:38
@liuche liuche mentioned this pull request Jan 22, 2020
32 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants