Optimise generated module to avoid calling external functions#67
Closed
hauleth wants to merge 1 commit intorkallos:mainfrom
Closed
Optimise generated module to avoid calling external functions#67hauleth wants to merge 1 commit intorkallos:mainfrom
hauleth wants to merge 1 commit intorkallos:mainfrom
Conversation
This reduces need for (relatively) expensive `Map.take/2` and `Map.merge/2` calls if these aren't needed. It also traverses metric list with internally defined function to avoid lambda and external function call.
Owner
|
You're on a roll! I think our discussion in #66 suggests removing the adding of global tags to metrics altogether from the hot path, and adding them during scrape/UDP send instead. Perhaps inside or just after Peep.Storage.get_all_metrics/* (inside may avoid a traversal, but puts the responsibility of adding global tags on implementers of the Peep.Storage behaviour) |
Contributor
Author
|
I have PR for that as well. It is just queued to be published. I spent last days on optimising the crap of Peep and Telemetry. |
Owner
|
Are you able to open PRs on this project that are based on one of your own
branches on your remote? That way I could review all the queued up changes
instead of going one at a time.
…On Tue, Feb 24, 2026, 11:41 a.m. Łukasz Jan Niemier < ***@***.***> wrote:
*hauleth* left a comment (rkallos/peep#67)
<#67 (comment)>
I have PR for that as well. It is just queued to be published. I spent
last days on optimising the crap of Peep and Telemetry.
—
Reply to this email directly, view it on GitHub
<#67 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEKJIOOB7AW4V3IZS3I3VD4NR5MVAVCNFSM6AAAAACV6GT5LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSNJTGM3DIMZQGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Contributor
Author
Contributor
Author
|
I even think that #69 make this PR irrelevant so maybe close it in favour of that? |
Owner
|
Closing now that #69 is merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reduces need for (relatively) expensive
Map.take/2andMap.merge/2calls if these aren't needed. It also traverses metriclist with internally defined function to avoid lambda and external
function call.