Use optional chaining to optimize logging #3411
Labels
prio-medium
Resolve this some time soon (tm).
scope-performance
Performance issue and ideas to improve performance.
Optional chaining only runs code at the next step of a property chain if it's defined. We could use this property to prevent running debug code with minimal syntax boilerplate. For example:
A more realistic example would look like
And we set logger.debug = undefined if logger level is greater than debug
The text was updated successfully, but these errors were encountered: