Automatic Balancing of Stream-Parallel Computations in P3LResource optimization via structured parallel programming