You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure how far to try and take minimal loading, but several files may not need to be loaded unless binding to SSL sockets, JSON/Psych/YAML may not need to be loaded, and some engines/platforms cannot use workers/cluster.
Also, given that Puma is relatively 'flat' re namespaces, loading could be centralized, maybe with a specific file like puma/load.rb. It could load all files needed by all configurations, and with comments make clear any files that are loaded outside of it. Some may work best with autoload, and maybe all other Puma files can be loaded with require_relative. By using one file, it may help remind everyone that any require statements added in PR's/commits should be reviewed.
Having also been in CI a bit lately, I always dislike having requires in test files, as it may hide issues with proper loading. Given that CI uses a fair bit of spawned processes to launch Puma, that isn't as much of an issue as with other repos...
Not sure how far to try and take minimal loading, but several files may not need to be loaded unless binding to SSL sockets, JSON/Psych/YAML may not need to be loaded, and some engines/platforms cannot use workers/cluster.
Also, given that Puma is relatively 'flat' re namespaces, loading could be centralized, maybe with a specific file like
puma/load.rb
. It could load all files needed by all configurations, and with comments make clear any files that are loaded outside of it. Some may work best with autoload, and maybe all other Puma files can be loaded with require_relative. By using one file, it may help remind everyone that any require statements added in PR's/commits should be reviewed.Having also been in CI a bit lately, I always dislike having requires in test files, as it may hide issues with proper loading. Given that CI uses a fair bit of spawned processes to launch Puma, that isn't as much of an issue as with other repos...
Anyway, looking for feedback, thoughts, etc.
The text was updated successfully, but these errors were encountered: