Skip to content

Utility Class Optimizations #1311

@mariuswilms

Description

@mariuswilms

The following bullet points identify areas for optimizing utility classes. This include removal of seldom used features (which presence at the same time also hurts performance) as well as pure performance optimizations.

Utility classes are special in that they are used across the entire framework. This makes them an important target for optimization efforts.

  • Use array_column() when possible in Set::extract(). extract() is one of the hot methods and using native functions is generally faster. If we need to make extract() less feature-rich to make this work, than we are ready to compromise.
  • Deprecate try/catch block in String::insert(), silencing exceptions is bad practice and also hurts performance when done in that loop. aeb1009
  • Deprecate non-flatten mode in Set::extract(), there is just one assertion for it and not used anywhere inside core. 063612f
  • Deprecate ? mode in Text::insert(), replace usage in data/source by prepared statements, then check it's not used anywhere else.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions