The chef_server source in policyfiles is pretty slow. Unfortunately we can't just throw threads at it because Chef::HTTP (parent of Chef::ServerAPI) can't have multiple requests from different threads being made with the same Chef::HTTP object at the same time. But we can make a wrapper around Chef::ServerAPI to make it work. We'd likely have to add some config option to enable thread mode, then put Chef::ServerAPIMulti in ChefDK or something.
JUST FOR DISCUSSION
ALSO the only relevant commit is the last one, the prior commits come from https://github.com/chef/cookbook-omnifetch/pull/17
The
chef_server
source in policyfiles is pretty slow. Unfortunately we can't just throw threads at it becauseChef::HTTP
(parent ofChef::ServerAPI
) can't have multiple requests from different threads being made with the sameChef::HTTP
object at the same time. But we can make a wrapper aroundChef::ServerAPI
to make it work. We'd likely have to add some config option to enable thread mode, then putChef::ServerAPIMulti
in ChefDK or something.Thoughts?