Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Optimize check for updates #9999

Merged
merged 1 commit into from
Jul 17, 2017
Merged

Optimize check for updates #9999

merged 1 commit into from
Jul 17, 2017

Conversation

bbondy
Copy link
Member

@bbondy bbondy commented Jul 15, 2017

It could cause periodic jank after the first 2 minutes, and then again every hour after that

Fix #9996

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.

Test Plan:

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

It could cause periodic jank after the first 2 minutes, and then again every hour after that

Fix #9996
@bbondy bbondy added this to the 0.18.x (Release Channel) milestone Jul 15, 2017
@bbondy bbondy self-assigned this Jul 15, 2017
@bbondy bbondy requested review from aekeus and bsclifton July 15, 2017 13:09
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Comment left- otherwise looks good 😄

@@ -131,17 +131,16 @@ var requestVersionInfo = (done, pingOnly) => {
if (!platformBaseUrl) throw new Error('platformBaseUrl not set')

// Get the daily, week of year and month update checks
var lastCheckYMD = AppStore.getState().toJS().updates['lastCheckYMD'] || null
const state = AppStore.getState()
var lastCheckYMD = state.getIn(['updates', 'lastCheckYMD']) || null
Copy link
Member

Choose a reason for hiding this comment

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

Could you update this to use the default value format? ex:
var lastCheckYMD = state.getIn(['updates', 'lastCheckYMD'], null)

might as well make the variables const too instead of var 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, addressed here: 05781e4

Copy link
Member Author

Choose a reason for hiding this comment

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

Merged it all the way up to 0.17.x but obviously no respin for that, just merged it up for the sake of easier merges if anything else changes.

@bbondy bbondy modified the milestones: 0.18.x (Release Channel), 0.17.17 (Release Channel) Jul 17, 2017
@aekeus
Copy link
Member

aekeus commented Jul 17, 2017

Looks good to me

@bsclifton bsclifton merged commit 2e1f0ab into master Jul 17, 2017
@bsclifton bsclifton deleted the updater-perf branch July 17, 2017 17:38
bsclifton added a commit that referenced this pull request Jul 17, 2017
bsclifton added a commit that referenced this pull request Jul 17, 2017
bsclifton added a commit that referenced this pull request Jul 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants