Closed Bug 1443765 Opened 2 years ago Closed 2 years ago
Fennec: Form changes invoke Session
Store more-or-less immediately causing low Speedometer scores
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.
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
passes test locally; pushing try for verification
Attachment #8957270 - Flags: review?(snorp)
Attachment #8957270 - Flags: review?(snorp) → review+
Pushed by firstname.lastname@example.org: 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
You need to log in before you can comment on or make changes to this bug.