On 5/11/16 3:56 AM, Cameron McCormack wrote:
Recording use counter information as we parse CSS is not too expensive,
although if we were doing it for all ~300 properties I’d be wanting to
check that we don’t slow sheet parsing speed down appreciably.  It’s
probably fine, but see the work that is done when recording one here:

  https://dxr.mozilla.org/mozilla-central/source/dom/base/nsDocument.cpp#13129

We use a std::bitset<> on the document to store the “use counted or not”
for each use counter so the memory overhead is low.  Someone with more
familiarity about the actual Telemetry payload can say whether it would
be alarming to have ~300 new entries, if you plan to eventually include
all properties.

bsmedberg got pinged in the bug to give feedback on that.

But starting with recording all of our non-standard property usage
sounds fine.

I've changed the bug title to start with non-standard props and we can take it from there.

Note that UseCounters.conf only supports longhand
properties currently, since we record them in here, where we’ve already
expanded shorthands out to their component longhands:

  
https://dxr.mozilla.org/mozilla-central/source/layout/style/nsCSSDataBlock.cpp#712

We could handle shorthands by recording them earlier, up in nsCSSParser
somewhere.

Good to know, thanks.

--
Mike Taylor
Web Compat, Mozilla
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to