octokit / core.js

Extendable client for GitHub's REST & GraphQL APIs
MIT License
1.18k stars 307 forks source link

chore: improve perf of hot path #637

Closed Uzlopak closed 10 months ago

Uzlopak commented 10 months ago

Reduce the hot path in core ;)

An investigation regarding the hotpaths showed that the console.warn and .error binding results take some time. Also a forEach call is Kind of hot.

To improve the performance console.warn and console.error are bound once at startup. before Screenshot from 2023-11-20 23-11-43

Resolves #ISSUE_NUMBER


Before the change?

-

After the change?

-

Pull request checklist

Does this introduce a breaking change?

Please see our docs on breaking changes to help!


Uzlopak commented 10 months ago

@wolfy1339 @gr2m

wolfy1339 commented 10 months ago

Can you describe the fix and the problem with text instead of just a picture next time.

It would help with searchability and context in the future if this comes back up

Uzlopak commented 10 months ago

@wolfy1339 added some context

github-actions[bot] commented 10 months ago

:tada: This PR is included in version 5.0.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: