1. Learn
  2. /
  3. Courses
  4. /
  5. Optimizing Code in Java

Connected

Exercise

Optimizing image processing with parallel streams

You're working on an image processing application that applies filters to large batches of images. Currently, the application processes images sequentially, but this is becoming a bottleneck as the number of images increases. You are tasked with implementing a parallel stream solution to improve performance.

The Image class was preloaded for you.

Instructions

100 XP
  • Convert the stream to a parallel stream for faster processing.
  • Apply filters to all images in the stream.
  • Collect the images to a single list.