Skip to content

The need for not being too slow - #1281

Merged
iAmWillShepherd merged 4 commits into
masterfrom
the-need-for-not-being-too-slow
Apr 24, 2017
Merged

iAmWillShepherd merged 4 commits into
masterfrom
the-need-for-not-being-too-slow

Conversation

@joshaber

@joshaber joshaber commented Apr 24, 2017 •

Copy link
Copy Markdown
Contributor

I noticed some performance problems with github/github when working on #1263. This addresses some of that low-hanging fruit:

  1. Wow Octokat.js was expensive. Its hypermedia support and camel-casing meant that we spent ~80ms per request in post-processing 😱

screen shot 2017-04-24 at 2 49 36 pm

This was 4-10x the amount of time spent in React. Happily Octokat.js lets us exclude the plugins we don't need. This also fixes #1048 by opting out of Octokat's cache handling.

  1. We were emitting an update even if we couldn't look up a GitHub user. Don't do that.
  2. We would keep trying to find GitHub users we already tried and failed to find. We could be more sophisticated about this, but for now we should just stop trying. Fixes Repeated 403 forbidden request errors in console #1053.

There's still some low-hanging fruit around making components pure, but with these changes the app feels fast again.

@iAmWillShepherd iAmWillShepherd self-assigned this Apr 24, 2017

@iAmWillShepherd iAmWillShepherd 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.

Looks good to me 👍

@iAmWillShepherd
iAmWillShepherd merged commit 226bb46 into master Apr 24, 2017
@iAmWillShepherd
iAmWillShepherd deleted the the-need-for-not-being-too-slow branch April 24, 2017 23:56
@philschatz

Copy link
Copy Markdown

I'm glad you found that you could load individual plugins before giving up on Octokat!

I noticed desktop has fixture files for Git. octokit.rb uses vcr/vcr for recording HTTP responses for unit tests instead of manually maintaining Mock responses; philschatz/fetch-vcr does that for fetch.

I'm in the middle of cleaning up the plugins and switching to use the fetch API directly in case that might be useful.

@joshaber

Copy link
Copy Markdown
Contributor Author

That's great news @philschatz! We've found Octokat's error handling a bit rough (#1522) but switching to fetch should help address that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants