Open
Bug 1650759
Opened 5 years ago
Updated 1 year ago
Investigate memory usage of Glean
Categories
(Data Platform and Tools :: Glean: SDK, defect, P4)
Data Platform and Tools
Glean: SDK
Tracking
(Not tracked)
NEW
People
(Reporter: janerik, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [telemetry:glean-rs:backlog])
So far we haven't paid much attention to Glean's memory usage.
We always considered the overhead of converting/copying back and forth between Rust and Java/Kotlin/Swift/Python/C# larger than any internal allocation anyway.
There's a couple of parts in Glean that definitely allocate:
- Common metric data (category, name, send_in_pings: all are heap-allocated strings)
- Ping payload
- Ping HTTP headers
- Test APIs (through JSON-formatted data)
- the database itself
Some of these are more or less static at compile time/load time (common metric data never changes[^1]).
It might be worth to:
- measure memory usage over the span of a normal application usage (across different platforms)
- determine alternative representations of quasi-static data
- inlined strings or string-interning ([^2])
None of this requires immediate attention (as no one complained yet).
[^1]: we built labeled metrics dynamically on top of these though.
[^2]: Inspiration: https://fasterthanli.me/articles/small-strings-in-rust
Updated•5 years ago
|
Whiteboard: [telemetry:glean-rs:m?] → [telemetry:glean-rs:backlog]
| Reporter | ||
Updated•4 years ago
|
Priority: P3 → P4
You need to log in
before you can comment on or make changes to this bug.
Description
•