Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up ghubp-host call #394

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Speed up ghubp-host call #394

wants to merge 2 commits into from

Conversation

ibizaman
Copy link
Contributor

@ibizaman ibizaman commented Nov 26, 2018

Magit-status on a repo containing 300 opened PRs took a lot of time. Profiling showed ghubp-host was taking roughly 35%.

This solution uses a hash table to cache the results.

Solves #349 partially.

This PR is not complete, we need a way to refresh the cache

For example, after calling magit-status on this repo, the variable contains:

#s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data
("/Users/ibizaman/.emacs.d/straight/repos/magithub/" "api.github.com"))

Then after magit-status on the ghub repo:

#s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data
("/Users/ibizaman/.emacs.d/straight/repos/magithub/" "api.github.com" "/Users/ibizaman/.emacs.d/straight/repos/ghub/" "api.github.com"))

Magit-status on a repo containing 300 opened PRs took a lot of time.
Profiling showed ghubp-host was taking roughly 35%.

This solution uses a hash table to cache the results.
@vermiculus
Copy link
Owner

Shouldn't this rather be done in ghub+?

@vermiculus
Copy link
Owner

Magithub can probably refresh the cache inside macro magithub-cache-without-cache. Most (all?) of the 'full refresh' commands get into this codepath eventually.

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.

2 participants