You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.
This is slow, since it requires Ruby (and all dependent libraries) to be loaded twice: once in kbsecret itself, and once in the exec'd subcommand. It also makes it harder to generate code coverage on the CLI.
In order to avoid this reloading, all internal kbsecret commands should become first class objects under the KBSecret::CLI namespace. Some options:
Subclass KBSecret::CLI in each, like KBsecret::CLI::New to kbsecret new.
Create a new subhierarchy with a consistent mapping, like KBSecret::CLI::Command::New to kbsecret new.
The text was updated successfully, but these errors were encountered:
Based on local testing, this results in a decent performance boost: require "kbsecret" takes about 400ms in total, so preventing a subcommand from needing its own brings a ~30% speedup in many cases.
And a solid half of require "kbsecret" is just making sure KBFS is mounted: 4920bc9 addresses this:
Right now, the
kbsecret
command calls internal commands (likelist
) viaexec
, just like external commands:This is slow, since it requires Ruby (and all dependent libraries) to be loaded twice: once in
kbsecret
itself, and once in theexec
'd subcommand. It also makes it harder to generate code coverage on the CLI.In order to avoid this reloading, all internal
kbsecret
commands should become first class objects under theKBSecret::CLI
namespace. Some options:KBSecret::CLI
in each, likeKBsecret::CLI::New
tokbsecret new
.KBSecret::CLI::Command::New
tokbsecret new
.The text was updated successfully, but these errors were encountered: