Skip to content

Persistent term optimisations#148

Merged
josevalim merged 2 commits intobeam-telemetry:mainfrom
NelsonVides:persistent_term_topic
Mar 10, 2026
Merged

Persistent term optimisations#148
josevalim merged 2 commits intobeam-telemetry:mainfrom
NelsonVides:persistent_term_topic

Conversation

@NelsonVides
Copy link
Contributor

As in the message for the first commit:

In telemetry:attach_many/4, we check if the function given to the
config is an external function and log noisy errors if it is not,
because the Erlang efficiency guide says these are more efficient.
Enforce the same for the telemetry_handler_table module at least for
the very hot path that looks up the handlers for an event. Also remove a
case-of from the execution path for another picosecond shave off.

In `telemetry:attach_many/4`, we check if the function given to the
config is an external function and log noisy errors if it is not,
because the Erlang efficiency guide says these are more efficient.
Enforce the same for the `telemetry_handler_table` module at least for
the very hot path that looks up the handlers for an event. Also remove a
case-of from the execution path for another picosecond shave off.
@NelsonVides NelsonVides changed the title Persistent term topic Persistent term optimisations Mar 9, 2026
@NelsonVides
Copy link
Contributor Author

@josevalim :))

@josevalim
Copy link
Contributor

cc @hauleth

@hauleth
Copy link
Contributor

hauleth commented Mar 10, 2026

LGTM

@josevalim josevalim merged commit 87c1345 into beam-telemetry:main Mar 10, 2026
5 checks passed
@josevalim
Copy link
Contributor

💚 💙 💜 💛 ❤️

@NelsonVides NelsonVides deleted the persistent_term_topic branch March 10, 2026 16:51
@NelsonVides
Copy link
Contributor Author

Great to see it merged 🎉

May we get a new hex release, 1.4.2 maybe? 🙃

@NelsonVides
Copy link
Contributor Author

Great to see it merged 🎉

May we get a new hex release, 1.4.2 maybe? 🙃

@josevalim ☝🏽🙃

@josevalim
Copy link
Contributor

I will do when I have some time available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants