Telemetry causes Places to do periodic main thread IO

RESOLVED WORKSFORME

Status

()

enhancement
P4
normal
RESOLVED WORKSFORME
2 years ago
a year ago

People

(Reporter: mconley, Unassigned)

Tracking

(Blocks 1 bug, {perf})

unspecified
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qf-][reserve-photon-performance])

Caught this in the profiler:

https://perfht.ml/2qxtwyG

Looks like we're stat-ing a file on the main thread.

http://searchfox.org/mozilla-central/rev/ae8c2e2354db652950fe0ec16983360c21857f2a/toolkit/components/places/PlacesDBUtils.jsm#900-906

There are a file other places in PlacesDBUtils.jsm where it looks like we're accessing the fileSize of various files. We should try to avoid those.
Flags: qe-verify?
Priority: -- → P2
(Reporter)

Comment 1

2 years ago
This is _probably_ only on idle-daily, which I guess is the least-bad place to do this... ni'ing myself to make sure that's the case.
Flags: needinfo?(mconley)
we collect telemetry on the gather-telemetry topic, that is currently fired on idle-daily, but that will change with bug 1127907.
Most of the PlacesDBUtils code is old and ugly, it should be rewritten with modern async/await, Sqlite.jsm and OS.File.
(Reporter)

Comment 3

2 years ago
As per comment 2 (and bug 1127907 comment 4).
Flags: needinfo?(mconley)
Whiteboard: [qf][photon-performance] → [qf-][photon-performance]
Flags: qe-verify? → qe-verify-
Priority: P2 → P3
Whiteboard: [qf-][photon-performance] → [qf-][reserve-photon-performance]
Priority: P3 → P4
Keywords: perf
I fixed this in a recent refactoring using OS.File.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 5

a year ago
For reference, that recent refactoring appears to have taken place in bug 1346554.
You need to log in before you can comment on or make changes to this bug.