I have been using a method with paralleStream() in order to perform some operations on files like translations and modification (different file types and size).
But i have noticed parallelStream sometimes behaves in a wierd way giving me different exceptions or Error outputs printing in the output file instead of proper translations.
On changing parallelStream() to sequentialStream() it works fine. But the problem is , since it is CPU-intensive operations, i need to have better performance in terms of speed.
what is the alternative of parallelstream that would work better than that in such situation.
Use case : Modification of files
Translation of file content from one language to another, so it requires to parsing through each segment in order to do the translation for each segments from source locale to target language locale.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…