Commit Graph

10 Commits

Author SHA1 Message Date
Bogdan Drutu 6db7374e2f
Add support for local memory pooling for data objects (#13678)
This feature is protected by a featuregate that is not yet enabled and
only marked as alpha. Preliminary results show > 20% CPU performance
improvement and at least 40% allocations improvement. I still need to
generate UnmarshalProto for AnyValue which should improve even more
results.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-21 03:19:49 +00:00
Bogdan Drutu caed03a4d1
[chore] Move UnmarshalJSON to use the ProtoField to generate (#13675)
Also, this PR improves JSON unmarshal logic by avoiding stack calls
caused by using the Read[Array|Object]CB and replace with simple
non-recursive iterations.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-19 20:47:42 +00:00
Bogdan Drutu 6db802a019
[chore] Enhance TestEncodingValues to test for all cases (#13667)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-19 16:47:43 +00:00
Bogdan Drutu 044e0920e5
[chore] Call NewOrig* func instead of manually create new objects in slices (#13647)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-15 22:13:24 +00:00
Bogdan Drutu eb9588bb3b
[chore] Fix custom marshaling code to preserve arrays order (#13641)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-14 18:03:50 +00:00
Bogdan Drutu 9b90d9f910
[chore] Generate custom proto unmarshal (#13626)
Benchmark results are in
https://github.com/open-telemetry/opentelemetry-collector/pull/13602

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-14 03:50:41 +00:00
Bogdan Drutu 787ae29ad2
[chore] pdatagen: Change JSON marshal to directly use the ProtoFields (#13616)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-11 20:40:52 +00:00
Bogdan Drutu 56d8c8f8ff
[chore] Move marshal/unmarshal JSON to work with origin (#13581)
Remove the complication about internal/public for all funcs that only
need origin. Also improves significant testing.

This simplified a lot the fields (no more isCommon/isBaseCommon/etc.)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-06 23:24:03 +00:00
Bogdan Drutu cb546d8654
[chore] Move FillOrigTest to use orig and always in internal (#13578)
This PR allows to add tests for CopyOrig directly in the internal
package, also enables us to move more things to internal (including
tests) for Marshal/Unmarshal.

After this PR is merged we can generate the ProtoSize and other proto
helpers in internal.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-06 18:30:28 +00:00
Bogdan Drutu 53528d4bfc
[chore] Move CopyOrig funcs all to internal (#13570)
Main idea is to have all funcs that work on "origin" in internal, so
that we simplify access to them (see field access to this). Also will
remove duplicate generated code like copying the slice of KeyValue
(followup PR).

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-05 18:58:04 +00:00