chef / knife-windows

Plugin for Chef's knife tool for working with Windows nodes
Apache License 2.0
152 stars 110 forks source link

Further optimize load times for the knife-windows plugins #497

Closed tas50 closed 4 years ago

tas50 commented 4 years ago

Don't load deps for the deprecated bootstrap commands These plugins don't use any of these deps as they just raise an error when used. Why include a bunch of extra loading we don't need.

Move helpers to a helpers dir to speed up knife loading. Knife loads any file in the knife directory every time any command is run. These files were not actual plugins and didn't need to be loaded on every run. Moving them into a helper directory allows us to load them in the deps block at the plugin runtime, but prevents them from loading during any old knife command. On my local machine this resulted in knife-windows going from 0.370523 to load to 0.003768000053 seconds. 98x faster by moving the files.