Think about more optimal field processing #14
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/zapjournald#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Requirements:
The third requirement is the hardest, I had a prototype using
SkipType
for zap fields in #12, but it doesn't work with (3).I see two solutions here:
SkipType
)zap.Field
has 3 fields to carry payload (String
,Integer
andInterface
), at least one of it is always empty. We could use it to carry some form of a mark to determine the field encoding rules.From the user POV I would like the second but it seems too dirty.
Currently benchmarks in repo show 800ns on my machine, with skip it may become 500ns.
One note about the first option -- it may provide us the needed optimization, because the slice we provide will become bigger (and thus bigger allocation)