Open Bug 694702 Opened 13 years ago Updated 2 years ago

Decode time telemetry doesn't account for synchronous decoding

Categories

(Core :: Graphics: ImageLib, defect)

defect

Tracking

()

People

(Reporter: rclick, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

Currently the telemetry for total decode time only accounts for time spent decoding asynchronously (in imgDecodeWorker::Run()). This should be expanded to include the other places where we write data to the decoder.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Robert, did you want to work on this? Jeff can probably give you some pointers if you need them.
I've known about this for a while. I'd actually hoped that we would switch to only writing data to the decoder in one place.
Attached patch patch (obsolete) — Splinter Review
This stores the decode time as a member of RasterImage, times how long we spend decoding in SyncDecode() and AddSourceData(), and accumulates the decode time and speed in ShutdownDecoder(). This seems to work, although I'm commonly seeing a decode time of zero. I'm still investigating why that's happening.
Attached patch patch v2 (obsolete) — Splinter Review
The zero decode times I was seeing seem to be due to TimeStamp not having enough resolution on my Windows box to accurately time decoding of tiny images. The data isn't very useful in that case, so I've opted to just not accumulate the data if we have a zero decode time. Assuming that's acceptable, this is ready for review. Jeff, can you look at this?
Attachment #571371 - Attachment is obsolete: true
Attachment #585681 - Flags: review?(jmuizelaar)
Attached patch patch v2Splinter Review
Oops, forgot to qref. This is the right patch.
Attachment #585681 - Attachment is obsolete: true
Attachment #585681 - Flags: review?(jmuizelaar)
Attachment #585686 - Flags: review?(jmuizelaar)
Comment on attachment 585686 [details] [diff] [review] patch v2 Review of attachment 585686 [details] [diff] [review]: ----------------------------------------------------------------- This patch is ok, but it adds more code that's basically doing the same thing in two places. Instead do you think you could look at refactoring the code so that we only write to the decoder in one place and then will only have to do the timing in a single place? ::: image/src/RasterImage.cpp @@ +2541,5 @@ > CONTAINER_ENSURE_SUCCESS(rv); > > + TimeDuration decodeLatency = TimeStamp::Now() - start; > + Telemetry::Accumulate(Telemetry::IMAGE_DECODE_LATENCY, > + PRInt32(decodeLatency.ToMicroseconds())); It looks like this accumulates the DECODE_LATENCY even for size decodes. We don't do this in the other case.
(In reply to Jeff Muizelaar [:jrmuizel] from comment #6) > This patch is ok, but it adds more code that's basically doing the same > thing in two places. Instead do you think you could look at refactoring the > code so that we only write to the decoder in one place and then will only > have to do the timing in a single place? Sure. I filed Bug 718927 for that.
Depends on: 718927
Comment on attachment 585686 [details] [diff] [review] patch v2 Dropping review request because of the refactoring needed for bug 718927
Attachment #585686 - Flags: review?(jmuizelaar)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: