Skip to content

update repository state selectively during stashing - #7471

Merged
outofambit merged 8 commits into
developmentfrom
bugfix/stash-refresh-less
May 9, 2019
Merged

outofambit merged 8 commits into
developmentfrom
bugfix/stash-refresh-less

Conversation

@outofambit

@outofambit outofambit commented May 6, 2019 •

Copy link
Copy Markdown
Contributor

Overview

related to #7464 , specifically

Overlapping getStatus calls introduce a bottleneck

which is a regression introduced by the implementation of stashing wrappers in app-store

Description

  • only update the parts of the repository state we need to after popping or pushing a stash
  • don't update repository state at all if pushing/popping around checking out a branch

To do

  • avoid getStatus calls when leaving changes on a branch

Measurements

Using @shiftkey's trace-all-the-things branch, I made the follow measurements on my macbook pro:

Scenario:

bring a single file change from master to 100768/pr-review-double-comment via switching branches (requires a stash, checkout, and pop) on github/github

Overall time

Before: 18s
After: 14s

(dev build of current production: 9s)

Number of git commands that took more than .1s

Before: 20
After: 10

(dev build of current production: 6)

@outofambit outofambit added performance Relating to things affecting performance epic:stashing Tracking label for work related to the stashing flow labels May 6, 2019
@outofambit outofambit added this to the 1.7.0 milestone May 6, 2019
@shiftkey

shiftkey commented May 6, 2019

Copy link
Copy Markdown
Member

@outofambit can you share what the net change here in Git calls made (number of Git calls and overall time spent) for an example setup?

@outofambit

Copy link
Copy Markdown
Contributor Author

@shiftkey PR body updated with those stats

@outofambit
outofambit marked this pull request as ready for review May 6, 2019 19:23
@outofambit outofambit added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 6, 2019
Comment thread app/src/lib/stores/app-store.ts Resolved
@kkayri

This comment has been minimized.

Comment thread app/src/lib/stores/app-store.ts Resolved

@billygriffin billygriffin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed this with @niik earlier and the one change that felt a bit riskier is now updated, so I'm going to approve, but would love one more person to have a quick final glance at it prior to merging for beta.

@outofambit
outofambit merged commit 8a754de into development May 9, 2019
@outofambit
outofambit deleted the bugfix/stash-refresh-less branch May 9, 2019 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

epic:stashing Tracking label for work related to the stashing flow performance Relating to things affecting performance ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants