Closed Bug 1451288 Opened 5 years ago Closed 5 years ago

Do not force histogram keys to be valid C++ identifiers


(Toolkit :: Telemetry, enhancement, P1)




Tracking Status
firefox61 --- fixed


(Reporter: gsvelto, Assigned: gsvelto)




(1 file)

+++ This bug was initially created as a clone of Bug #1423715 +++

While working on bug 1423715 we discovered that there is no need to constrain the histogram keys as we currently do so that they only use characters that would be valid in a C++ identifier.

Since we're not generating any C++ identifiers from those we can drop the constraint, and in fact we've already been recording keys that were incompatible with it.
Assignee: nobody → gsvelto
We had this limitation in place as we were planning to introduce histogram keys enum in bug 1361960. However, that still has to happen. Moreover, we are not enforcing the same limitations for keys at runtime. I would say let's consider dropping bug 1361960, stop enforcing valid c++ identifiers for keys at build time and re-evaluate the problem if we stumble upon a performance bottleneck in the future.

Georg, what do you think?
Flags: needinfo?(gfritzsche)
(Sorry for the long delay)
It sounds like you have the impact considered Alessio, i leave this call to you.
If you need feedback, you can loop in someone else from our Telemetry client team.
Flags: needinfo?(gfritzsche)
Comment on attachment 8964884 [details]
Bug 1451288 - Do not force histogram keys to be valid C++ identifiers;

I think we can move forward with this. We don't even have to [update the docs](, as the enforced constraint wasn't even documented. I will close bug 1361960 as won't fix for now. We can revisit the decision when and if we decide we'll need the optimization.
Attachment #8964884 - Flags: review?(alessio.placitelli) → review+
See Also: → 1361960
Priority: -- → P1
Pushed by
Do not force histogram keys to be valid C++ identifiers; r=Dexter
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.