Closed Bug 701038 Opened 13 years ago Closed 13 years ago

use zip/unzip to optimize devicemanagerADB's pushDir

Categories

(Testing :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla11

People

(Reporter: gbrown, Assigned: gbrown)

Details

(Whiteboard: [android][mobile_unittests])

Attachments

(1 file, 1 obsolete file)

When running xpcshell-tests-remote, devicemanagerADB must push the entire xpcshell tests directory (many hundreds of small files) to device. It does this one file at a time, and this typically takes over 30 minutes.

If zip is available on the local host and unzip is available on the remote host (unzip seems to be included in busybox), then pushDir can zip the directory, push just one zip file, and unzip on the device. Preliminary results suggest this can be done for xpcshell-tests-remote in under 4 minutes (unzipping takes most of the time).
Assignee: nobody → gbrown
Attached patch patch to zip/unzip in pushDir (obsolete) — Splinter Review
A preliminary patch -- needs more testing.
(In reply to Geoff Brown [:gbrown] from comment #0)
> When running xpcshell-tests-remote, devicemanagerADB must push the entire
> xpcshell tests directory (many hundreds of small files) to device. It does
> this one file at a time, and this typically takes over 30 minutes.
> 
> If zip is available on the local host and unzip is available on the remote
> host (unzip seems to be included in busybox), then pushDir can zip the
> directory, push just one zip file, and unzip on the device. Preliminary
> results suggest this can be done for xpcshell-tests-remote in under 4
> minutes (unzipping takes most of the time).

One drive-by comment:
I know that we have unzip implemented in the SUTagent, not sure if that helps you at all though if your target is to use the ADB agent.  But it might be worth looking at how that is implemented.
(In reply to Clint Talbert ( :ctalbert ) from comment #2)
> One drive-by comment:
> I know that we have unzip implemented in the SUTagent, not sure if that
> helps you at all though if your target is to use the ADB agent.  But it
> might be worth looking at how that is implemented.

Thanks for the tip! I found that devicemanagerSUT.unpackFile uses the "unzp" command. On the agent, Java classes from java.util.zip are used to unzip the stream. I won't use this for adb, but have spun off bug 705162 for SUT.
Attachment #573216 - Attachment is obsolete: true
Attachment #578972 - Flags: review?(jmaher)
Comment on attachment 578972 [details] [diff] [review]
patch to zip/unzip in ADB pushDir

Review of attachment 578972 [details] [diff] [review]:
-----------------------------------------------------------------

this looks great!
Attachment #578972 - Flags: review?(jmaher) → review+
https://hg.mozilla.org/mozilla-central/rev/232990286849
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Component: New Frameworks → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: