User:Clouserw/AMO/Perf: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 5: Line 5:
Originally the plan for this was someone uploads an add-on, AMO sends the add-on to Talos (build machines), the build machines install the add-on on Firefox with a clean profile on several OSs, runs it a few times recording interesting numbers and then sends those numbers back to AMO.  AMO compares those numbers with an average (also reported from Talos) and if the numbers are too far apart it shows performance warnings on AMO.
Originally the plan for this was someone uploads an add-on, AMO sends the add-on to Talos (build machines), the build machines install the add-on on Firefox with a clean profile on several OSs, runs it a few times recording interesting numbers and then sends those numbers back to AMO.  AMO compares those numbers with an average (also reported from Talos) and if the numbers are too far apart it shows performance warnings on AMO.


The system was constructed and launched briefly but there was backlash from add-on developers since we never really communicated with them and were suddenly flagging their add-ons as slowing down Firefox.  Many bugs were filed asking for clarification of process and pointing out holes in the system (like add-ons that only slow Firefox down after the browser is used or settings are set).  The Talos processing proved to be unreliable and sometimes took 20 minutes for a single add-on.  The code was turned off in production and has been ignored since.
The system was constructed and launched briefly but there was concern from add-on developers since we never really communicated with them and were suddenly flagging their add-ons as slowing down Firefox.  Many bugs were filed asking for clarification of process and pointing out holes in the system (like add-ons that only slow Firefox down after the browser is used or settings are set).  The Talos processing proved to be unreliable and sometimes took 20 minutes for a single add-on.  The code was turned off in production and has been ignored since.


== Next steps for performance ==
== Next steps for performance ==
Line 19: Line 19:
* Create a CRUD form to enter this data
* Create a CRUD form to enter this data
** Group permissions are AddonPerf:Edit
** Group permissions are AddonPerf:Edit
** Form is accessible from a link associated with a file.  That is to say, Performance data is associated with individual .xpi files
** Form is accessible from a link associated with each version on the "Manage Status & Versions" page.  That is to say, Performance data is associated with add-on versions, not .xpi files.
** The form consists of:
** The form consists of:
*** Operating System:  '''No version'''.  Options: Windows, OS X, Linux, Android
*** (checkbox) Operating System:  '''No version'''.  Options: WINNT, Darwin, Linux, Android
*** Application: '''No version'''. Options: Firefox
*** (checkbox) Application: '''No version'''. Options: Firefox
*** Performance metric: Options: startup, memory, general
*** (radio) Performance metric: Options: startup, memory, general
*** Severity: Options: no impact, small impact, major impact
*** (radio) Severity: Options: no impact, small impact, major impact
*** Notes: An optional field for any notes from the reviewer
*** (textarea) Notes: An optional field for any notes from the reviewer.  Standard "some HTML allowed" textarea.
* Hook up the performance warning div's on the details pages, adjusting the wording for the new severity levels
* Hook up the performance warning div's on the details pages, adjusting the wording for the new severity levels
* Send the new performance data through the API:
* Send the new performance data through the API (details below)


=== API ===
=== API ===


A <tt><warnings></tt> element would be added to the <tt><addon></tt> element, which contains <tt><performance></tt> elements to describe performance warnings. It would be present in:
A <tt><warnings></tt> element would be added to the <tt><addon></tt> element, which contains <tt><performance></tt> elements to describe performance warnings. It would be present in in all <addon> output sections including:
* Keyword search API (to display warnings when searching for addons to install)
* Keyword search API (to display warnings when searching for addons to install)
* GUID search API (to display warnings for installed addons, and in install confirmation dialogs)
* GUID search API (to display warnings for installed addons, and in install confirmation dialogs)
Line 37: Line 37:
This also apples to non-hosted addons, although they would only be returned in a GUID search. All <tt><addon></tt> elements would indicate if the addon was hosted or not (same as the <tt><addon_compatibility></tt> elements do). If an non-hosted addon has no warnings, then the returned data would not include a <tt><addon></tt> element for that addon. If a hosted addon has no warnings, then the <warnings> element would not be included (as opposed to being included, but empty).
This also apples to non-hosted addons, although they would only be returned in a GUID search. All <tt><addon></tt> elements would indicate if the addon was hosted or not (same as the <tt><addon_compatibility></tt> elements do). If an non-hosted addon has no warnings, then the returned data would not include a <tt><addon></tt> element for that addon. If a hosted addon has no warnings, then the <warnings> element would not be included (as opposed to being included, but empty).


Warnings for all versions of the addon need to be included, as the installed version may not be the latest version. Although, this is only a hard requirement for GUID search - keyword search can potentially only include data for the latest version.
Warnings for all versions of the addon need to be included, as the installed version may not be the latest version. Although, this is only a hard requirement for GUID search - keyword search can potentially only include data for the latest version. (let's be consistent between the two for now and include all. --clouserw)


Based on the assumption that many warnings will apply to more than one OS, the <tt>os</tt> attribute of <tt><performance></tt> elements is a comma-separated list of OS names. If warnings are different for the different OSes, then multiple <tt><performance></tt> elements can be included, with different values for the <tt>os</tt> attribuite. The values need to match the strings used by <tt>nsIXULRuntime.OS</tt> - "Darwin" for OSX, "WINNT" for Windows, "Linux" for Linux, "Android" for Android.
Based on the assumption that many warnings will apply to more than one OS, the <tt>os</tt> attribute of <tt><performance></tt> elements is a comma-separated list of OS names. If warnings are different for the different OSes, then multiple <tt><performance></tt> elements can be included, with different values for the <tt>os</tt> attribuite. The values need to match the strings used by <tt>nsIXULRuntime.OS</tt> - "Darwin" for OSX, "WINNT" for Windows, "Linux" for Linux, "Android" for Android.
Line 62: Line 62:
== Open Questions ==
== Open Questions ==


* (An add-on can have many versions which can have many files)  AMO for the most part advertises versions to the end user and figures out what file to serve (often only differing in OS) automatically.  Would it be more appropriate to associate performance data with add-on versions rather than files?
* How this works (like, the actual storing in the db) for add-ons not hosted at AMO is ignored in the steps above still.
** Yes, that seems fine. The Add-ons Manager can't currently differentiate between different XPIs anyway (except via source URL, which isn't always available). AFAICT, AMO only lets XPIs differ by what OS they support - and that's handled fine by a generic per-version form.
* A similar question for add-ons not hosted at AMO.  Associating with GUID+Version sounds like the right thing to do there anyway.
** Yep. Anything more complex (eg, hashing the XPI) seems overkill for this.
* How this works for add-ons not hosted at AMO is ignored in the steps above still.
Confirmed users, Bureaucrats and Sysops emeriti
1,737

edits

Navigation menu