I have run into issues with long loading times for using some of my custom packages, and it appears to be because those packages load a lot of dependencies (as suggested here). But often my packages only need some small subset of the functionality provided by another package (e.g., I only need
gradient from ForwardDiff).
So, I have two questions:
- Is there a way to only load a subset of a package? (I.e., something like
using ForwardDiff: gradient, but only load code related to
gradientinstead of loading everything in ForwardDiff.)
- If so, how can I structure my package code to enable users to only load a subset of the functionality? Submodules?
Thanks in advance.