Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

RegionSearchLocalizationProvider is slow on builds without MLS key #5989

Closed
boek opened this issue Feb 19, 2020 · 5 comments
Closed

RegionSearchLocalizationProvider is slow on builds without MLS key #5989

boek opened this issue Feb 19, 2020 · 5 comments
Assignees
Labels
E5 Estimation points: 5 <location> Component: feature-location
Milestone

Comments

@boek
Copy link
Contributor

boek commented Feb 19, 2020

MozillaLocationService.fetchRegion caches a result, but if it doesn't get a result it will continue to to make that request every single time we use the RegionSearchLocalizationProvider

┆Issue is synchronized with this Jira Task

@pocmo
Copy link
Contributor

pocmo commented Feb 20, 2020

Afaik you should also get a result with a dummy key - but it is rate limited. Are you sure you do not get anything back? 🤔

@boek
Copy link
Contributor Author

boek commented Feb 20, 2020

Oops! We were using an empty string. I will try a dummy key and close this out!

@boek
Copy link
Contributor Author

boek commented Feb 20, 2020

@pocmo Is there a specific dummy key to use? I am getting this response {"error":{"errors":[{"domain":"usageLimits","reason":"keyInvalid","message":"Missing or invalid API key."}],"code":400,"message":"Missing or invalid API key."}} so it always returns null bypassing the cache

@pocmo
Copy link
Contributor

pocmo commented Feb 21, 2020

I'll take a look.

@pocmo
Copy link
Contributor

pocmo commented Feb 21, 2020

  • I prepared a patch that moves the location service behind an interface. So in situations where we do not want to use it we can use a dummy location service (and AC will provide one).

  • SearchEngineManager is doing only one request to determine the location. And this is done from loadSearchEngines() which is supposed to be called only once (or if the configuration changes). Where are the additional calls into RegionSearchLocalizationProvider coming from?

pocmo added a commit to pocmo/android-components that referenced this issue Feb 21, 2020
pocmo added a commit to pocmo/android-components that referenced this issue Feb 21, 2020
pocmo added a commit to pocmo/android-components that referenced this issue Feb 21, 2020
@pocmo pocmo added this to 🏃‍♀️ In Progress in A-C: Android Components Sprint Planning Feb 24, 2020
pocmo added a commit to pocmo/android-components that referenced this issue Feb 25, 2020
pocmo added a commit to pocmo/android-components that referenced this issue Feb 27, 2020
bors bot pushed a commit that referenced this issue Feb 27, 2020
6021: Issue #5989: Create LocationService interface and make MozillaLocatioService implement it. r=jonalmeida a=pocmo



6082: Bug 1618128 - Import WebCompat 8.0.0 sources into feature-webcompat. r=pocmo a=denschub

It's close to the end of a Gecko release cycle, which brings us to the end of the WebCompat release cycle. New version, wohoo!



Co-authored-by: Sebastian Kaspari <s.kaspari@gmail.com>
Co-authored-by: Dennis Schubert <dschubert@mozilla.com>
pocmo added a commit to pocmo/fenix that referenced this issue Feb 28, 2020
Workaround for issue described in:
mozilla-mobile/android-components#5989

For debug builds it is unnecessary to use the actual location provider since those builds
do not have an API key configured. With that patch we replace the location provider with
a dummy implementation in debug builds.
boek pushed a commit to mozilla-mobile/fenix that referenced this issue Feb 28, 2020
Workaround for issue described in:
mozilla-mobile/android-components#5989

For debug builds it is unnecessary to use the actual location provider since those builds
do not have an API key configured. With that patch we replace the location provider with
a dummy implementation in debug builds.
@jonalmeida jonalmeida moved this from 🏃‍♀️ In Progress to 🏁 Done in A-C: Android Components Sprint Planning Mar 2, 2020
@pocmo pocmo closed this as completed Mar 4, 2020
@pocmo pocmo added the E5 Estimation points: 5 label Mar 4, 2020
@pocmo pocmo added this to the 35.0.0 ✨ milestone Mar 4, 2020
gmierz pushed a commit to gmierz/fenix that referenced this issue Mar 5, 2020
Workaround for issue described in:
mozilla-mobile/android-components#5989

For debug builds it is unnecessary to use the actual location provider since those builds
do not have an API key configured. With that patch we replace the location provider with
a dummy implementation in debug builds.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
E5 Estimation points: 5 <location> Component: feature-location
Projects
No open projects
Development

No branches or pull requests

2 participants