Closed Bug 969827 Opened 10 years ago Closed 10 years ago

Map a preference to a Gaia setting to configure the jank threshold

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vingtetun, Assigned: vingtetun)

References

Details

Attachments

(2 files)

Comment on attachment 8372821 [details] [diff] [review]
bug969827.gecko.patch

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

At some point we'll need to redesign the developer panel. It's such a mess now...
Attachment #8372821 - Flags: review?(fabrice) → review+
(In reply to Fabrice Desré [:fabrice] from comment #3)
> Comment on attachment 8372821 [details] [diff] [review]
> bug969827.gecko.patch
> 
> Review of attachment 8372821 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> At some point we'll need to redesign the developer panel. It's such a mess
> now...

I agree with you, hopefully Janx is working a bit on that.
Comment on attachment 8372820 [details] [diff] [review]
bug969827.gaia.patch

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

Awesome! Thanks for the patch.

I am indeed working on redesigning part of the developer menu in bug #968220.

::: apps/settings/elements/developer.html
@@ +60,4 @@
>            </label>
>          </li>
>          <li>
> +          <p data-l10n-id="janks-threshold">Janks Threshold</p>

Nit: Could we rename this to "Jank Threshold"? I believe the plural is unnecessary.

@@ +64,5 @@
> +          <span class="button icon icon-dialog">
> +            <select name="devtools.janks.threshold" data-value-type="integer">
> +              <option value="20">20</option>
> +              <option value="50">50</option>
> +              <option value="100" selected>100</option>

Is the `selected` useful? I thought the current setting value automatically selected the right option.

::: build/config/common-settings.json
@@ +44,4 @@
>     "deviceinfo.update_channel": "",
>     "device.storage.writable.name": "sdcard",
>     "devtools.overlay": false,
> +   "devtools.janks.threshold": 100,

You are starting with a pretty low jank threshold. I think that's a good idea, but I seem to remember that you suggested starting at a high number (e.g. 500ms) and I'm curious about the decision.
Attachment #8372820 - Flags: review?(janx) → review+
Comment on attachment 8372821 [details] [diff] [review]
bug969827.gecko.patch

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

::: b2g/chrome/content/settings.js
@@ +235,5 @@
>    }
>  });
>  
> +SettingsListener.observe('devtools.janks.threshold', 100, function(value) {
> +  Services.prefs.setIntPref('devtools.janks.threshold', value);

Nit: 'devtools.jank.threshold'?
(we try to use "eventlooplag" instead of "jank" in the devtools code)
(In reply to Jan Keromnes [:janx] from comment #5)
> 
> You are starting with a pretty low jank threshold. I think that's a good
> idea, but I seem to remember that you suggested starting at a high number
> (e.g. 500ms) and I'm curious about the decision.

I'm mostly interested in big numbers for tests purpose. That should be easier to land something with a big threshold. And once it is landed, nobody can go beyond this virtual barrier, and the product can be enhanced by lowering it.
(In reply to Paul Rouget [:paul] from comment #7)
> (we try to use "eventlooplag" instead of "jank" in the devtools code)

I renamed all the |jank| in the preferences to |eventlooplag|.
https://github.com/mozilla-b2g/gaia/commit/23435b4f1c7bf8f2a24b8fce154e21933cec4eba

Gaia part. It looks not pretty in the new HUD but since I'm going to land the platform part to configure it in a sec it worth having it imho.
(In reply to Paul Rouget [:paul] from comment #7)
> (we try to use "eventlooplag" instead of "jank" in the devtools code)

I'm curious what lead to this decision. Sure "eventlooplag" is more precise, but "jank" seems to be the common term used by web developers, and it's shorter. I think we should keep using "jank" in user-facing interfaces like the Developer HUD.
Flags: needinfo?(paul)
Vivien, I think you forgot to reply to this question:

(In reply to Jan Keromnes [:janx] from comment #5)
> @@ +64,5 @@
> > +          <span class="button icon icon-dialog">
> > +            <select name="devtools.janks.threshold" data-value-type="integer">
> > +              <option value="20">20</option>
> > +              <option value="50">50</option>
> > +              <option value="100" selected>100</option>
> 
> Is the `selected` useful? I thought the current setting value automatically
> selected the right option.

It seems redundant and error-prone to maintain default values in two different locations.
Flags: needinfo?(21)
https://hg.mozilla.org/mozilla-central/rev/30b62226a4d8
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Depends on: 973232
(In reply to Jan Keromnes [:janx] from comment #12)
> (In reply to Paul Rouget [:paul] from comment #7)
> > (we try to use "eventlooplag" instead of "jank" in the devtools code)
> 
> I'm curious what lead to this decision. Sure "eventlooplag" is more precise,
> but "jank" seems to be the common term used by web developers, and it's
> shorter. I think we should keep using "jank" in user-facing interfaces like
> the Developer HUD.

Ok.
Flags: needinfo?(paul)
(In reply to Jan Keromnes [:janx] from comment #13)
> Vivien, I think you forgot to reply to this question:
> 
> (In reply to Jan Keromnes [:janx] from comment #5)
> > @@ +64,5 @@
> > > +          <span class="button icon icon-dialog">
> > > +            <select name="devtools.janks.threshold" data-value-type="integer">
> > > +              <option value="20">20</option>
> > > +              <option value="50">50</option>
> > > +              <option value="100" selected>100</option>
> > 
> > Is the `selected` useful? I thought the current setting value automatically
> > selected the right option.
> 
> It seems redundant and error-prone to maintain default values in two
> different locations.

It's probably not very useful.
Flags: needinfo?(21)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: