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

don’t convert paths to immutable #9468

Merged
merged 2 commits into from
Jun 15, 2017
Merged

don’t convert paths to immutable #9468

merged 2 commits into from
Jun 15, 2017

Conversation

bridiver
Copy link
Collaborator

@bridiver bridiver commented Jun 14, 2017

Converting to immutable is slow

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

@bridiver bridiver added this to the 0.17.x (Beta Channel) milestone Jun 14, 2017
@bridiver bridiver self-assigned this Jun 14, 2017
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.

This change is a little weird, because getTabInternalIndexByTabId (which is called inside getPathByTabId) returns an Immutable object. So the caller would need to know if the return value is mutable or not (ex: check for return.toJS etc). Let me check in a test which shows the problem

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.

Disregard previous comment- I was pulling up code locally and had unintentionally opened frameState => getPathByTabId 😄 This change looks good!

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.

Added unit test; ++

@bsclifton bsclifton merged commit dc534ed into master Jun 15, 2017
@bsclifton bsclifton deleted the state-paths branch June 15, 2017 06:22
bsclifton added a commit that referenced this pull request Jun 15, 2017
don’t convert paths to immutable
bsclifton added a commit that referenced this pull request Jun 15, 2017
don’t convert paths to immutable
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.

2 participants