Use parallel stream to process YANG text files 97/86797/3
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 7 Jan 2020 23:21:49 +0000 (00:21 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 9 Jan 2020 16:37:48 +0000 (17:37 +0100)
commitfcb529766049a3ab75cd9a0de4603c0a815c5a0b
tree59d1f7aee138bad80be62553f5293e2abb180468
parentc31a1fe841def0d168ceb4dc8131650894d99fa1
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>
yang/yang-maven-plugin/src/main/java/org/opendaylight/yangtools/yang2sources/plugin/YangToSourcesProcessor.java