-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Settings objects became too big #58797
Copy link
Copy link
Open
Labels
developmentDevelopement process & source code & implementation detailsDevelopement process & source code & implementation details
Description
Describe the situation
The struct itself is big, and we also generate some loops over struct members, it leads to very large functions, large stack frames, too many local variables in a function, and too many symbols for anonymous lambda functions in the code.
Proposed solution
If we replace settings' access from, e.g., settings.max_threads (a struct member) to settings[Settings::max_threads] (a map indexed by an integer), we can get rid of these problems, and keep the ergonomics (Settings::max_threads will still be auto-completed and validated at compile time).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
developmentDevelopement process & source code & implementation detailsDevelopement process & source code & implementation details