Open jeremyandrews opened 11 months ago
As far as I understand the slowdown is mostly from reqwest cookie feature itself, so removing that is fine, but cluttering the code with cfg feels like premature optimization.
Yes, the added config option is not an attempt to speed up or optimize anything. It's so the compiler can catch if someone 1) disables cookies, and then 2) tries to use cookie functinality: it will fail to compile. Without the config option, a person could disable cookies but use the code causing a panic or other undefined errors.
cookies
feature, enabled by defaultcookies
are disabledcookies
feature is enabled in GooseBy making this a compile-time feature, we can enforce at compile-time that nobody expects cookies to work properly when using this startup optimization. Attempts to use Reqwest's cookie-related functions will fail if the Goose
cookie
feature is disabled. This also removes the cookie dependencies when it's not needed.