Closed Bug 1771888 Opened 2 years ago Closed 2 years ago

Reduce cloning of submetrics for labeled metrics

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: janerik, Assigned: janerik)

Details

Attachments

(1 file)

We're cloning the submetric on each access now inside FOG.
We should restructure that to avoid cloning and re-use objects where possible.
glean-core alreay gives us an Arc, which we might be able to pass on.

Assignee: nobody → jrediger
Priority: P3 → P1
Whiteboard: [telemetry:glean-rs:m?]

This means we need that Arc in boolean, counter & string,
but we avoid cloning the internal metric. Glean already made that
optimization lately.

Note 1: The actual metric types use an Arc internally in glean-core,
so we're nesting Arcs here. I don't think that's problematic though.

Note 2: No measurements have been done whether this really changes much.
Also we probably do not have that many labeled metrics yet for it to
make a measurable difference to begin with.

Pushed by jrediger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0ebed9d7c52d
Put labeled metrics into an arc to avoid cloning. r=chutten
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: