Commit Graph

2 Commits

Author SHA1 Message Date
Mike Klein
5f13bef501 ok, rate limit forking
On Macs the user process limit is low, in the hundreds, and it's a
little annoying to mysteriously find other programs fail to start
because ok is greedily slurping up all the available process capacity.

On Linux the user process limit is up in the ten-thousands, so I don't
expect this to matter there, even on Android.  I haven't seen any
significant speed difference imposing a default ncpus limit.

Change-Id: Id284723808074441710c0436acbd75ab1c6bbbb3
Reviewed-on: https://skia-review.googlesource.com/41840
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-01 15:40:37 +00:00
Mike Klein
154e6dadea factor Engine out of ok core
This makes Engines (task execution strategies: serial, thread, fork)
pluggable just like most of the rest of ok.  It removes the thread and
process limits, as I find myself rarely caring about what they are
exactly.  Instead of limiting to num-cores, we just allow any number of
concurrent threads, and any number of concurrent child processes subject
to OS limitations.

Change-Id: Icef49d86818fe9a4b7380efb60e73e40bc2e6b73
Reviewed-on: https://skia-review.googlesource.com/27140
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-26 21:36:40 +00:00