Bug 216100

Summary: run-webkit-tests spends 20-30 seconds "building" ImageDiff
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, darin, ews-watchlist, glenn, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review-

Description Jonathan Bedard 2020-09-02 14:52:04 PDT
Tools/Scripts/build-imagediff --release

takes an inordinate amount of time for a null build (20-30 seconds), and run-webkit-tests calls it on every invocation, even if you pass --no-build.

This is 40-50% of the time it takes to run-webkit-tests a single test in the iOS simulator, and thus would wildly increase the turnaround rate when developing a test.
Comment 1 Jonathan Bedard 2020-09-02 14:52:29 PDT
<rdar://problem/68232690>
Comment 2 Jonathan Bedard 2020-09-02 14:57:33 PDT
Created attachment 407819 [details]
Patch
Comment 3 Tim Horton 2020-09-02 15:11:32 PDT
Comment on attachment 407819 [details]
Patch

Won't _path_to_image_diff (which is @memoize'd) store the failure to find it in check_image_diff, and return that after we build it (thus making ImageDiff not found if it got built)?
Comment 4 Jonathan Bedard 2020-09-02 15:38:36 PDT
(In reply to Tim Horton from comment #3)
> Comment on attachment 407819 [details]
> Patch
> 
> Won't _path_to_image_diff (which is @memoize'd) store the failure to find it
> in check_image_diff, and return that after we build it (thus making
> ImageDiff not found if it got built)?

Likely yes, the right solution is probably to clear out the memoization, but our current @memoize doesn't support that
Comment 5 Alexey Proskuryakov 2020-09-02 18:18:15 PDT
Isn't bug 204420 the root cause here?
Comment 6 Tim Horton 2020-09-02 18:22:12 PDT
(In reply to Alexey Proskuryakov from comment #5)
> Isn't bug 204420 the root cause here?

Do you mean "isn't this a dupe of that"? I think the answer is "yes"!
Comment 7 Darin Adler 2020-09-02 21:20:44 PDT

*** This bug has been marked as a duplicate of bug 204420 ***