Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: octokit/plugin-rest-endpoint-methods.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.2.2
Choose a base ref
...
head repository: octokit/plugin-rest-endpoint-methods.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.2.3
Choose a head ref
  • 1 commit
  • 2 files changed
  • 2 contributors

Commits on Jun 14, 2023

  1. fix(performance): pre-compute and lazily initialize endpoint methods (#…

    …622)
    
    We have observed that the octokit initialisation is quite slow,
    especially in combination with [probots](https://github.com/probot/probot)
    which creates a new octokit instance for each incoming request.
    This causes the main event loop to block for a considerable time.
    
    With our change we moved the preparation of the endpoints api object
    into the module scope and use a Proxy object to defer the initialisation
    of octokit defaults and decorations to the first API call per method.
    
    Although we have not measured it, we believe the overhead that comes
    from the proxied method call is insignificant in comparison to the
    network latency of an API call.
    
    Co-authored-by: wolfy1339 <4595477+wolfy1339@users.noreply.github.com>
    ZauberNerd and wolfy1339 authored Jun 14, 2023
    Configuration menu
    Copy the full SHA
    a7887d0 View commit details
    Browse the repository at this point in the history
Loading