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

Improve Hyprpm Update Performance #5530

Merged
merged 4 commits into from
Apr 10, 2024

Conversation

https123456789
Copy link
Contributor

@https123456789 https123456789 commented Apr 10, 2024

Describe your PR, what does it fix/add?

Improves the performance of the hyprpm update command by reducing the amount of data fetched over the network. The current version of hyprpm clones the entire Hyprland repo to do an update. This includes tens of thousands objects that are not used or referenced and are deleted after building the headers. In addition, the tracy submodule is also cloned, however it is never included in the build as hyprpm always builds headers in release mode. This PR changes these behaviors by:

  • Using a shallow clone based on only history since the currently running commit, dramatically reducing the number of objects that need to be fetched (from a couple thousand to ~300 for any commit within the past couple months).
  • Removing unused submodules (tracy) to avoid expensive cloning.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

This performance improvement is only really noticeable on systems that have a slower internet connection (like mine). For me, running hyprpm update took around 4.5 minutes before the changes and around 2.4 minutes after.

Is it ready for merging, or does it need work?

Ready for merging.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

thanks :)

@vaxerski vaxerski merged commit 558d1be into hyprwm:main Apr 10, 2024
9 checks passed
lisuke pushed a commit to lisuke/Hyprland that referenced this pull request Apr 15, 2024
* hyprpm: only clone the required history

* hyprpm: don't include tracy when building headers in release mode

* chore: remove old, commented-out code

See hyprwm#4585 (comment)

* chore: format code properly
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