[mozprofile] Allow Profile.clone to only clone parts of the profile
Categories
(Testing :: Mozbase, 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.
Comment 1•3 years ago
|
||
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.
Comment 2•3 years ago
|
||
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?
Description
•