{"id":20162569,"url":"https://github.com/zdharma-continuum/pm-perf-test","last_synced_at":"2025-09-21T12:32:56.798Z","repository":{"id":45764292,"uuid":"425745402","full_name":"zdharma-continuum/pm-perf-test","owner":"zdharma-continuum","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-16T03:00:25.000Z","size":234,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-14T00:28:55.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zdharma-continuum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-08T07:57:34.000Z","updated_at":"2024-08-19T01:40:27.000Z","dependencies_parsed_at":"2024-11-14T00:37:13.297Z","dependency_job_id":null,"html_url":"https://github.com/zdharma-continuum/pm-perf-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fpm-perf-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fpm-perf-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fpm-perf-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fpm-perf-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdharma-continuum","download_url":"https://codeload.github.com/zdharma-continuum/pm-perf-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233753377,"owners_count":18724823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T00:25:48.306Z","updated_at":"2025-09-21T12:32:51.465Z","avatar_url":"https://github.com/zdharma-continuum.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Performance test of some of the Zsh plugin managers\n\nTo run the test, execute:\n\n```zsh\n./run.zsh\n```\n\nHowever, there are problems with `zplug` when running the test this way – the test hangs with a message:\n\n```\nzsh: suspended (tty input)  ./run.zsh\n```\n\nSo an invocation of `fg` is required. To address this, run the test script as a function:\n\n```zsh\nfpath+=( $PWD )\nautoload run.zsh\nrun.zsh\n```\n\n## Drawing the results\n\nTo generate a graph of the average load times:\n\nFirst, install dependencies:\n\n```zsh\npython3 -m pip install matplotlib\n```\n\nThen,\n\n```zsh\npython3 plot.py\n```\n\n## Details of the test\n\nThe test loads the following 28 plugins:\n\n```\narzzen/git-quick-stats.git\nfakerr/git-recall\ngeometry-zsh/geometry\nhlissner/zsh-autopair\niwata/git-now\njhawthorn/fzy\njunegunn/fzf-bin\nk4rthik/git-cal\nogham/exa\nohmyzsh / lib/git.zsh\nohmyzsh / plugins/git/git.plugin.zsh\ntj/git-extras\ntrapd00r/ls_colors\nurbainvaes/fzf-marks\nvoronkovich/gitignore.plugin.zsh\nzdharma-continuum/declare-zshrc\nzdharma-continuum/git-url\nzdharma-continuum/history-search-multi-word\nzdharma-continuum/revolver\nzdharma-continuum/vramsteg-zsh\nzdharma-continuum/zconvey\nzdharma-continuum/zsh-diff-so-fancy\nzdharma-continuum/zsh-editing-workbench\nzdharma-continuum/zsh-navigation-tools\nzdharma-continuum/zsh-unique-id\nzdharma-continuum/zui\nzdharma-continuum/zunit\nzsh-users/zsh-autosuggestions\n```\n\nSome of the plugins are relatively regular `Makefile`-based projects, like `arzzen/git-quick-stats.git`. The\n`atclone''`, `make''`, ice modifiers of Zinit and the `hook-build` tag of Zplug allow to install and use them. However\nthey're problematic with `zgen`, which doesn't have such hooks. For it, instead an empty plugin\n[zdharma/null](https://github.com/zdharma/null) is being loaded in a following way:\n\n```zsh\n# git-recall\nzgen load zdharma-continuum/null null.plugin.zsh empty-plugin.zsh-13\n```\n\n```zsh\n# git-quick-stats\nzgen load zdharma-continuum/null null.plugin.zsh empty-plugin.zsh-14\n```\n\nthe `empty-plugin.zsh-14`, etc. is a branch. The file `null.plugin.zsh` contains only 3 instructions:\n\n```zsh\n0=\"${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}\"\n0=\"${${(M)0:#/*}:-$PWD/$0}\"\ntrue\n```\n\nThis way, a little balance is introduced into the test and creates a good minimum for the comparison – to have `zgen`\nonly clone and load an almost empty plugin instead of setting up a `PATH` for a command-like plugin, especially because\nof the way that `zgen` works – by storing plain `source` commands and not executing any code.\n\nHowever, it puts `zgen` in a better position because it has to clone an almost empty repository and not a complete\nproject, so the installation-time test is biased. However, it's hard to address this without simplifying the test\nbecause of limited `zgen` functionality. Also, `zgen` doesn't run the compilation (i.e. `make`) during the installation\nof the plugins.\n\nZplug and Zinit tests are relatively identical\n([zshrc](https://github.com/zdharma/pm-perf-test/blob/master/zplug/.zshrc) for Zplug,\n[zshrc](https://github.com/zdharma/pm-perf-test/blob/master/zinit-load/.zshrc) for Zinit).\n\n## Results\n\n![Installation times](https://raw.githubusercontent.com/zdharma-continuum/pm-perf-test/master/plots/installation-times.png)\n\n![Startup times](https://raw.githubusercontent.com/zdharma-continuum/pm-perf-test/master/plots/startup-times.png)\n\n## Result comments\n\nThe three different Zinit results need explaining:\n\n1. Zinit light – plugins are being loaded without tracking, i.e., cannot be unloaded, and their reports are empty.\n1. Zinit load – plugins are being loaded with tracking, i.e., are available for unloading, and their report data is\n   gathered (available through `zinit report {plugin-name}` command).\n1. Zinit (Turbo) load – plugins are loaded with tracking **and in Turbo mode** – i.e., in the background \u0026 after prompt\n   – the shell is instantly ready to use.\n\n\u003c!-- vim:set ft=markdown tw=80 autoindent: --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdharma-continuum%2Fpm-perf-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdharma-continuum%2Fpm-perf-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdharma-continuum%2Fpm-perf-test/lists"}