Skip to content

Commit

Permalink
Do not generate XXX fields in protobufs (#1725)
Browse files Browse the repository at this point in the history
* Do not generate XXX fields in protobufs

We don't need them. By gettig rid of them we achieve:

- smaller memory footprint
- smaller payloads on the wire
- same in-memory layout with core Prometheus structs opening path for all sorts of optimisations such as unsafe casts, leading to better memory use and faster :)
- see related issue: prometheus/prometheus#6029

The tests show SG memory allocations dropped 5% for query execution:
- Showing nodes accounting for -359.20MB, 6.19% of 5798.93MB total

Signed-off-by: Philip Panyukov <ppanyukov@googlemail.com>

* comment to explain why do don't generate XXX fields in protobufs

Signed-off-by: Philip Panyukov <ppanyukov@googlemail.com>
  • Loading branch information
ppanyukov authored and bwplotka committed Nov 13, 2019
1 parent a0747ef commit 5eb43c1
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 256 deletions.

0 comments on commit 5eb43c1

Please sign in to comment.