PoshFunctions
PoshFunctions copied to clipboard
Bundle on build & publish for better performance
Context
Importing the module takes a long time, everything from 2-8 seconds in my short testing. This can be greatly improved by bundling all functions into a single .psm1 file, rather than foreach dot source.
Resources on best practice for perf:
- https://stackoverflow.com/questions/79338576/what-is-best-practice-to-speed-up-powershell-module-import
- https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/performance/module-authoring-considerations
Request
Consider doing a build / bundle step in the release pipeline to bundle these files into one single *.psm1?
Some relevant tools: