Closed Bug 1175760 Opened 5 years ago Closed 4 years ago

Recording configuration should be set by target support, not just prefs

Categories

(DevTools :: Performance Tools (Profiler/Timeline), defect)

41 Branch
defect
Not set

Tracking

(firefox41 affected, firefox42 fixed)

RESOLVED FIXED
Firefox 42
Tracking Status
firefox41 --- affected
firefox42 --- fixed

People

(Reporter: jsantell, Assigned: jsantell)

References

Details

Attachments

(1 file)

Right now we set a recording's configuration based on prefs, like record memory, record framerate, record allocations etc.

Our views check if an actor is supported as well if the configuration was set, based on the client's pref. When importing a profile like this, it'll say it has "withMemory" support, even though there's no memory data on the original target. I'm not sure if we even cover that import case, since there's no target to feature detect.

What we should do is set the configuration via prefs like we do now, and then when setting on the RecordingModel via PerformanceFront, we should override if target does not support. Like:

new RecordingModel({ withMemory: this._memorySupported ? options.withMemory : false })

That way we don't have to have feature detection stuff littered throughout the client, and a recording's configuration is a single source of truth.

We need to do this before creating a real PerformanceActor.
Big piece required before moving things to PerformanceActor

 https://treeherder.mozilla.org/#/jobs?repo=try&revision=588ba3504fdb
Assignee: nobody → jsantell
Status: NEW → ASSIGNED
Attachment #8633234 - Flags: review?(vporof)
Comment on attachment 8633234 [details] [diff] [review]
1175760-target-prefs.patch

Review of attachment 8633234 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/performance/modules/logic/front.js
@@ +433,5 @@
> +   *
> +   * @param {object} options
> +   * @param {boolean}
> +   */
> +  _normalizeOptions: function (options) {

Maybe move this to recording-utils.js?

::: browser/devtools/performance/views/details.js
@@ +118,5 @@
>      }
>    }),
>  
>    /**
> +   * Takes a view name and determines if the current recording 

Nit: trailing ws
Attachment #8633234 - Flags: review?(vporof) → review+
https://hg.mozilla.org/mozilla-central/rev/277d6aaf2ba2
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.