Closed Bug 1079774 Opened 10 years ago Closed 10 years ago

[mozrunner] Reduce time spent detecting crashes on devices

Categories

(Testing :: Mozbase, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla35

People

(Reporter: davehunt, Assigned: davehunt)

Details

Attachments

(1 file)

Bug 1038868 exposed that we're spending rather a lot of time when we're detecting crashes on devices. At the moment we pull the minidumps folder (which is empty if there hasn't been a crash) and then list any remote files for removal. We can at least make the list/removal of remote files conditional based on the existence of a crash by checking the local temporary directory, but I wonder if there's also a more cost-effective way of pulling the remote directory too.
It appears that pulling an empty directory is faster than checking if there's in a remote directory. This patch checks to see if anything was pulled to the local directory and only tries removing remote files if there were.
Attachment #8501659 - Flags: review?(ahalberstadt)
Comment on attachment 8501659 [details] [diff] [review]
Only try to list/remove remote files if some were pulled. v1.0

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

Maybe we could avoid pulling the directory at all if the remote_dump_dir is empty?
Attachment #8501659 - Flags: review?(ahalberstadt) → review+
(In reply to Andrew Halberstadt [:ahal] from comment #2)
> Comment on attachment 8501659 [details] [diff] [review]
> Only try to list/remove remote files if some were pulled. v1.0
> 
> Review of attachment 8501659 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Maybe we could avoid pulling the directory at all if the remote_dump_dir is
> empty?

That's something I tried, but as mentioned in comment 1 it appears that doing a directory listing is more expensive than pulling an empty directory.
https://hg.mozilla.org/mozilla-central/rev/d3e3fc74801b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.