Skip to content

Settings objects became too big #58797

@alexey-milovidov

Description

@alexey-milovidov

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).

Metadata

Metadata

Assignees

Labels

developmentDevelopement process & source code & implementation details

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions