Currently, whenever the algorithm requires to get timestamps, it'll
try to get the corresponding precision reduced timestamps. However,
this creates some memory overhead because the calculation of precision
reduced timestamps. So instead of always generating the precision
reduced timestamps, we use the raw timestamps internally to avoid
generating precision reduced timestamps unnecessarily.
Differential Revision: https://phabricator.services.mozilla.com/D105829
AutoTArray gives us some memory overhead and the benefits it provides
might not be that useful since PerformanceEventTiming only works
for certain event types.
Differential Revision: https://phabricator.services.mozilla.com/D105078
Upon the construction of `eventCounts`, a wrapper of it will be created
because we set the initial values to 0. This exposes the interface
despite the pref is not set.
Differential Revision: https://phabricator.services.mozilla.com/D104872
Performance event entries should only be retrieved by
PerformanceObserver, so it can't be retrieved by using
Performance.GetEntries* APIs.
Differential Revision: https://phabricator.services.mozilla.com/D102036
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
and EnumSerializer.h)
This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h
Differential Revision: https://phabricator.services.mozilla.com/D94459
Currently we store the raw `StartTime` as a `TimeStamp` object, and
convert it to `DOMHighResTimeStamp` when calling `StartTime()`. However,
there's no need to do the conversion every time.
Differential Revision: https://phabricator.services.mozilla.com/D96296
PerformanceResourceTiming recalculates the startTime every time when
`StartTime()` method is called, which slows down `GetEntriesByName()`
due to this method requires `StartTime()` to order the entries.
In addition to that, there's not need to recalculate it every time, since all
required timings are already set when the `PerformanceTimingData`
object is first created.
This patch calculates the `startTime` when it's accessed first time
and caches it.
Differential Revision: https://phabricator.services.mozilla.com/D96295
Currently we store the raw `StartTime` as a `TimeStamp` object, and
convert it to `DOMHighResTimeStamp` when calling `StartTime()`. However,
there's no need to do the conversion every time.
Depends on D96295
Differential Revision: https://phabricator.services.mozilla.com/D96296
PerformanceResourceTiming recalculates the startTime every time when
`StartTime()` method is called, which slows down `GetEntriesByName()`
due to this method requires `StartTime()` to order the entries.
In addition to that, there's not need to recalculate it every time, since all
required timings are already set when the `PerformanceTimingData`
object is first created.
This patch calculates the `startTime` in the constructor and caches it.
Differential Revision: https://phabricator.services.mozilla.com/D96295
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045