Use parallel stream to process YANG text files 51/86851/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 7 Jan 2020 23:21:49 +0000 (00:21 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 11 Jan 2020 22:52:31 +0000 (23:52 +0100)
commitb028174e50175e343864d03be44ff821a2d7c9f2
tree28347735c611047f4ccc31990e11c97a696c720d
parent1a44ce6a0ce6300bd2fce1724d6bd6b7d8b79f37
Use parallel stream to process YANG text files

When we are examining local YANG files, we are also performing
first step of parsing to determine what the module/revision is
without relying on the file name. This process can take quite
some time if the models are large and/or there are many of them.

Since each file is independent at this stage, use a parallel
stream (and hence common FJ pool) to perform this task in multiple
threads before moving on to processing.

JIRA: YANGTOOLS-1062
Change-Id: I31cee2aa7f313052565ba723cf4c52566821a625
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit fcb529766049a3ab75cd9a0de4603c0a815c5a0b)
yang/yang-maven-plugin/src/main/java/org/opendaylight/yangtools/yang2sources/plugin/YangToSourcesProcessor.java