Skip to content
Commit d0eb38ae authored by Stefan Brüns's avatar Stefan Brüns
Browse files

Reduce PropertyInfo construction overhead

The private data is static and immutable, so it can be shared by all
instances. This significantly reduces the overhead of instantiating
a PropertyInfo for the most common cases. Most importantly, the
i18n of displayString is delayed, so e.g. `Property(...).name()` and
`PropertyInfo::fromName(...).property()` are faster by an order of
magnitude.

All public access functions are already const, and the public class
is pimpl'ed, so this change is API and ABI compatible.
parent 2cae4b6c
Pipeline #410100 passed with stage
in 2 minutes and 8 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment