Closed Bug 1443765 Opened 6 years ago Closed 6 years ago

Fennec: Form changes invoke SessionStore more-or-less immediately causing low Speedometer scores

Categories

(Firefox for Android Graveyard :: Session Restore, defect, P2)

All
Android
defect

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: jesup, Assigned: jesup)

References

Details

Attachments

(2 files, 1 obsolete file)

Speedometer 2.0 frequently changes 100 checkboxes all at once (completeAllItems()).  On fennec (but not on focus-android with klarGeckoArm/x86Debug) this causes a very large amount of CPU time to be spent in collect() in SessionStore, gathering form data.  (75% of the time in a profile of the running portion of the test, excluding the refreshdriver section).

This is seen in the InteractiveRunner.html test of speedometer in the "completeAllItems(sync)" case.  This also causes a high variation in scores.

For Vanilla-ToDoMVC, on a Galaxy S7, focus-Gecko takes 100-200ms for completeAllItems(sync); fennec takes 1-2 seconds, 10x worse.  With Sessionstore neutered with a 'return' in handleEvent, it takes 200-300ms.

I presume sessionstore could be delayed and batched for a short period, or deferred until idle with some maximum, etc.  Users rarely change many form controls at once, but JS on a page might (SelectAll or UncheckAll, etc).  Even for the 1-element case it might have some impact on responsiveness of the browser to react to an input change.
Assignee: nobody → rjesup
This also implies that a series of events (like UnselectAll for checkboxes)
will be batched.
Attachment #8956890 - Flags: review?(snorp)
Note: still need to verify it's saving dynamically
Attachment #8956890 - Flags: review?(snorp) → review+
fix 1-char typo.  Note that test_session_form_data.html will need to be adjusted; it assumes synchronous saving.
Attachment #8956890 - Attachment is obsolete: true
Priority: -- → P2
Hardware: Unspecified → All
passes test locally; pushing try for verification
Attachment #8957270 - Flags: review?(snorp)
Attachment #8957270 - Flags: review?(snorp) → review+
Blocks: 1444222
Pushed by rjesup@wgate.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f34ad0155500
delay SessionStore for Fennec on input events r=snorp
https://hg.mozilla.org/integration/mozilla-inbound/rev/c1152eaf2036
Update android formdata sessionstore test for delayed save r=snorp
https://hg.mozilla.org/mozilla-central/rev/f34ad0155500
https://hg.mozilla.org/mozilla-central/rev/c1152eaf2036
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: