Closed Bug 1832784 Opened 1 year ago Closed 1 year ago

Importing Saved Form History data is slower on low-end computers

Categories

(Firefox :: Migration, defect, P1)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
115 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox113 --- unaffected
firefox114 --- verified
firefox115 --- verified

People

(Reporter: atrif, Assigned: mconley)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached image migration_form.gif

Found in

  • 114.0b3

Affected versions

  • 115.0a1 (2023-05-10)
  • 114.0b3

Tested platforms

  • Affected platforms: Windows 7x64 (HDD), Ubuntu 20.05 (HDD)
  • Unaffected platforms: macOS 12, Windows 10x64 (SSD)

Preconditions

  • have some Saved Form History data

Steps to reproduce

  1. Open Firefox and import Saved Form History data.
  2. Observe the importing time.

Expected result

  • The action does not take very long.

Actual result

  • Importing Saved Form History takes some time.

Regression range

  • Not a regression, started with the implementation of bug 1827425.

Additional notes

  • Attached a screen recording.
  • May be similar to bug 1825239.
  • I can reproduce this on my Ubuntu 20.04 and Windows 7x64 machine which has a hard drive. On other systems that have an SSD, the import is performed fast.
  • This happens with legacy migratory and with both new migration windows.

:atrif, if you think that's a regression, could you try to find a regression range using for example mozregression?

Hi atrif,

You can safely ignore bugbot. :) But would you be able to gather and post a performance profile from that machine recorded when doing the migration? I'm not sure if you've ever had occasion to do that before, but just in case: https://firefox-source-docs.mozilla.org/performance/reporting_a_performance_problem.html

Flags: needinfo?(atrif)

(In reply to Mike Conley (:mconley) (::gear:) from comment #2)

Hi atrif,

You can safely ignore bugbot. :) But would you be able to gather and post a performance profile from that machine recorded when doing the migration? I'm not sure if you've ever had occasion to do that before, but just in case: https://firefox-source-docs.mozilla.org/performance/reporting_a_performance_problem.html

Hey Mike! Sure thing! Here is one from Ubuntu 22.04 with Firefox 114.0b6 (https://share.firefox.dev/3WgVgHW) and this one is from Windows 7x64 (https://share.firefox.dev/3WmlZD1). I hope this helps! Note that this does not happen on every profile/browser that I import from. This maybe happens because on some profiles are more forms of autofill data and/or I'm signed in with an account. On a new chrome-browser profile with less autofill form history data, importing performs a lot faster. If more information is needed please let me know.

Flags: needinfo?(atrif)

Hm - none of the profiled threads seem to have the information I need. Can you please re-profile, but this time configure the profiler (by visiting about:profiling) and checking "Bypass selections above and record all registered threads"?

Flags: needinfo?(atrif)

(In reply to Mike Conley (:mconley) (:⚙️) from comment #4)

Hm - none of the profiled threads seem to have the information I need. Can you please re-profile, but this time configure the profiler (by visiting about:profiling) and checking "Bypass selections above and record all registered threads"?

Unfortunately, I could not upload the profiles directly to the profiler due to the increased size. I downloaded them locally and uploaded them here and here. I hope this helps.

Flags: needinfo?(atrif)

Hi atrif,

I have some try builds here with a patch that I think might improve the performance of importing form autofill entries. Can you please try them to see if they help on those older devices?: https://treeherder.mozilla.org/jobs?repo=try&revision=f0a71ea05455cdefc73a600cb91741e8487e9d40

Flags: needinfo?(atrif)

(In reply to Mike Conley (:mconley) (:⚙️) from comment #7)

Hi atrif,

I have some try builds here with a patch that I think might improve the performance of importing form autofill entries. Can you please try them to see if they help on those older devices?: https://treeherder.mozilla.org/jobs?repo=try&revision=f0a71ea05455cdefc73a600cb91741e8487e9d40

Hello Mike!

Sure thing! With the above try build importing form history happens almost instantly or a maximum of ~2sec on the same low-end computers with Ubuntu 22.04, Ubuntu 20.04, and Windows 7x64 on which I could reproduce the issue initially. Thank you!

Flags: needinfo?(atrif)
Assignee: nobody → mconley
Attachment #9335442 - Attachment description: WIP: Bug 1832784 - Batch add operations during form history migration. → Bug 1832784 - Batch add operations during form history migration. r?Gijs!
Status: NEW → ASSIGNED
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/52b0c1d3e0df Batch add operations during form history migration. r=sgalich
Priority: -- → P1

Comment on attachment 9335442 [details]
Bug 1832784 - Batch add operations during form history migration. r?Gijs!

Beta/Release Uplift Approval Request

  • User impact if declined: Users that attempt to migrate form autofill from other browsers on older machines with large form autofill databases (or slow disks) will find that migration takes a long time.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Covered by automated tests, and is quite well contained. Essentially, for a row of autofill entries, instead of inserting each one individually into the database one by one, we create an intermediate list of autofill entries, and insert them as a batch.
  • String changes made/needed: None.
  • Is Android affected?: No
Attachment #9335442 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

Verified fixed with Firefox 115.0a1 (2023-05-26) when importing form autofill history from Chrome browser on the same systems that the issue is still manifesting with an affected build (Windows 7 x64, Ubuntu 20.04 and Ubuntu 22.04). The form autofill data is almost instantly imported.

Comment on attachment 9335442 [details]
Bug 1832784 - Batch add operations during form history migration. r?Gijs!

114 regression and low risk, approved to land on the beta branch before Monday merge to mozilla-release for our RC build, thanks.

Attachment #9335442 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified fixed with Firefox 114.0 (20230529085652) on Windows 7x64, Ubuntu 20.04 and Ubuntu 22.04. The form autofill data is almost instantly imported.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: