I already encountered timeouts with streams and java 8.
I don't know why, but the FIRST execution of a stream can take a long time. I workaround the issue on other contest by simply ensuring the streams are used at least once during the first turn with a dummy code. such as:
List warmup = Arrays.asList("toto", "tata");
warmup.stream().min((s1, s2)-> Integer.compare(s1.length(), s2.length())).get();
Hope that helps