message: parallelize run_split_dexes
  Summary: Faster is better.
diff: @@ -678,22 +678,28 @@ Stats run_split_dexes(DexStoresVector& stores,
  mmap[t].emplace_back(std::move(data));
  }
  - // Could parallelize this, but the set is likely small.
  Stats result{};
  + std::mutex mutex; // protecting result
  + std::vector<const DexClasses*> dexes;
  for (const DexStore& store : stores) {
  for (const auto& dex : store.get_dexen()) {
  + dexes.push_back(&dex);
  + }
  + }
  + workqueue_run<const DexClasses*>(
  + [&](const DexClasses* dex) {
  // Collect the candidates in this dex.
  std::vector<DexType*> dex_candidate_types;
  - for (const auto* c : dex) {
  + for (const auto* c : *dex) {
  if (cset.count(c->get_type()) != 0) {
  dex_candidate_types.push_back(c->get_type());
  }
  }
  if (dex_candidate_types.empty()) {
  - continue;
  + return;
  }
  std::unordered_set<DexMethodRef*> method_refs;
  - for (auto cls : dex) {
  + for (auto cls : *dex) {
  cls->gather_methods(method_refs);
  }
  @@ -748,6 +754,7 @@ Stats run_split_dexes(DexStoresVector& stores,
  for (auto& data : dex_candidate_methods) {
  size_t required = data.switch_range->mid_cases.size() - 1;
  if (left < required) {
  + std::lock_guard<std::mutex> lock_guard(mutex);
  ++result.no_slots;
  continue;
  }
  @@ -761,12 +768,13 @@ Stats run_split_dexes(DexStoresVector& stores,
  new_size += m->get_code()->sum_opcode_sizes();
  }
  + std::lock_guard<std::mutex> lock_guard(mutex);
  result.new_methods.insert(new_methods.begin(), new_methods.end());
  result.transformed_srcs.emplace(data.m,
  std::make_pair(orig_size, new_size));
  }
  - }
  - }
  + },
  + dexes);
  return result;
  }
  