Bug 179958 - Fast binding generation by batching several files at once
Summary: Fast binding generation by batching several files at once
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Basuke Suzuki
Keywords: InRadar
Depends on:
Reported: 2017-11-22 15:27 PST by Basuke Suzuki
Modified: 2017-12-06 16:47 PST (History)
10 users (show)

See Also:

patch (16.46 KB, patch)
2017-11-22 15:41 PST, Basuke Suzuki
no flags Details | Formatted Diff | Diff
fix (16.46 KB, patch)
2017-11-27 16:09 PST, Basuke Suzuki
achristensen: review+
achristensen: commit-queue-
Details | Formatted Diff | Diff
fixed (16.42 KB, patch)
2017-12-05 17:28 PST, Basuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Basuke Suzuki 2017-11-22 15:27:11 PST
Bindings generation spawns sub processes for each idl files, but fork/exec pattern is very slow on Windows. To reduce the process generation, control script can pass several files at once to the process.

Here is a statistics for 796 idl files:

Current imprementation: 386 secs
Batching 10 files:       63 secs
Aggressive approach:     36 secs (rest of files / number of process)
Comment 1 Basuke Suzuki 2017-11-22 15:41:47 PST
Created attachment 327472 [details]
Comment 2 Basuke Suzuki 2017-11-27 16:09:58 PST
Created attachment 327708 [details]
Comment 3 Alex Christensen 2017-11-28 10:43:33 PST
I'm ok with this as long as Sam doesn't object.
Comment 4 Alex Christensen 2017-11-28 11:19:57 PST
Comment on attachment 327708 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=327708&action=review

> Source/WebCore/bindings/scripts/generate-bindings-all.pl:167
> +    my $batchCount = 30;
> +    # my $batchCount = int(($totalCount - $currentCount) / $numOfJobs) || 1;

Let's not comment out a line.  Also, the second line isn't quite right either.  As it is it strangely gives smaller batches as work progresses.  Let's do something more like $totalCount / $numOfJobs.
Comment 5 Basuke Suzuki 2017-12-05 17:28:03 PST
Created attachment 328537 [details]

fixed as Alex reviewed.
Comment 6 WebKit Commit Bot 2017-12-05 19:54:54 PST
Comment on attachment 328537 [details]

Clearing flags on attachment: 328537

Committed r225565: <https://trac.webkit.org/changeset/225565>
Comment 7 WebKit Commit Bot 2017-12-05 19:54:56 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2017-12-06 16:47:15 PST