Open Bug 1759189 Opened 3 years ago Updated 3 years ago

[mozprofile] Allow Profile.clone to only clone parts of the profile

Categories

(Testing :: Mozbase, task)

Default
task

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

Details

We are using Profile.clone in testing/web-platform/mozilla/tests/webdriver/bidi/conftest.py , but it might be enough to only copy preferences files and avoid copying all the files from the profile.

See comments at https://phabricator.services.mozilla.com/D140800?id=555267#inline-775456

An used profile can get up to several hundreds of MB. So cloning that compared to just
some kB of data is not only time intensive, but also causes lot of IO reads/writes.

Note that these tests run for each and every Wd1 job in CI and over time adds quite some > overhead and extra costs.

For the record, my worry is that such optimizations mean additional code and rely on the assumption that copying the preferences files is enough to get a profile adequate for the test.

Geoff, we have cases when we only need the user.js and optionally prefs.js from a given profile that should be cloned. Given that profiles can be quite large I wonder if it would be ok to add an option to Profile.clone to restrict copying files for only whitelisted categories i.e. preferences.

Flags: needinfo?(gbrown)
Summary: Investigate performance issues for mozprofile Profile.clone → [mozprofile] Allow Profile.clone to only clone parts of the profile

Having a "clone" function that sometimes doesn't clone everything might be a source of confusion or misunderstanding -- I'd prefer to avoid that if possible.

How about creating a new Profile and setting the preferences as required?

Flags: needinfo?(gbrown)
You need to log in before you can comment on or make changes to this bug.