Skip to content

Commit

Permalink
Use Map#forEach instead of a stream in `BuildConfigurationKeyMapPro…
Browse files Browse the repository at this point in the history
…ducer`.

Stream overhead shows up in profiles.

PiperOrigin-RevId: 676476809
Change-Id: I28cc2a674f56973217a0731cdebc35a44e36a9bc
  • Loading branch information
justinhorvitz authored and fmeum committed Sep 20, 2024
1 parent 11d949f commit e305848
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,14 @@ public BuildConfigurationKeyMapProducer(

@Override
public StateMachine step(Tasks tasks) {
this.options.entrySet().stream()
.map(
entry ->
options.forEach(
(context, buildOptions) ->
tasks.enqueue(
new BuildConfigurationKeyProducer<>(
(BuildConfigurationKeyProducer.ResultSink<String>) this,
StateMachine.DONE,
entry.getKey(),
entry.getValue()))
.forEach(tasks::enqueue);
context,
buildOptions)));
return this::combineResults;
}

Expand Down

0 comments on commit e305848

Please sign in to comment.