[mozdevice]: Do not copy entire source directory before pushing to device.

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
4 years ago
9 months ago

People

(Reporter: jlal, Assigned: gbrown)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
Currently we copy/delete the copy when pushing a directory http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py#248 there might be some context here that is missing but |adb push| is non destructive and these operations take up to 1s to complete for gaia profiles.
(In reply to James Lal [:lightsofapollo] from comment #0)
> Currently we copy/delete the copy when pushing a directory
> http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozdevice/
> mozdevice/devicemanagerADB.py#248 there might be some context here that is
> missing but |adb push| is non destructive and these operations take up to 1s
> to complete for gaia profiles.

Yeah, we do this to make sure the contents of symbolic links are pushed. See bug 810546 or the comment above at http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py#216 .

One second does not actually seem that long to me, certainly it would be dwarfed by other factors in any testrun. Unless you're calling pushDir over and over again in which case I would ask... why are you doing that? :)
(Reporter)

Comment 2

4 years ago
Oops 1s -> 10s

Following symbolic links is doable without copying the entire source (with a bit more work) this was being used to push gaia directories after we modified the profile or added 1-2 apps or changed a few things... Pushing the delta takes 1-2 seconds (including the time to scan everything over adb which is fast pushing is slow).
(In reply to James Lal [:lightsofapollo] from comment #2)
> Oops 1s -> 10s
> 
> Following symbolic links is doable without copying the entire source (with a
> bit more work) this was being used to push gaia directories after we
> modified the profile or added 1-2 apps or changed a few things... Pushing
> the delta takes 1-2 seconds (including the time to scan everything over adb
> which is fast pushing is slow).

I'm fine with any patch that doesn't break any existing use cases and improves performance across the board. If you're doing something really specialized, you could also consider writing your own custom logic using adb directly.
(Assignee)

Updated

9 months ago
Assignee: nobody → gbrown
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.