You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At this time the whole check runs in a single thread. For larger API jsons (300+ paths) processing takes a while.
Simple math: 300paths * count of breaking changes checks. It does not scale much.
The processing can be launched in parallel
In DefaultBreakChecker return rules.stream().map(rule -> rule.checkRule(oldApi, newApi)).flatMap(Collection::stream).collect(toList());
with just a replacement of stream() into parallelStream() it runs faster...
Unfortunately it has some possible side effects. The order of result list of breaking changes is unpredictable - that can be confusing for user. Therefore I also suggest to add a support for BreakingChange priority and to sort the result list by this value. Eg. PathRemoval breaking change can have higher order priority than others.
Also I am not sure about implementation of classes SeenRefHolder, SchemaStoreProvider which they are using ThreadLocal.
There are also other possible places for speed improvements. Eg. loading old and new api can be launched in parallel as well. With Project reactor it can be a piece of cake.
The text was updated successfully, but these errors were encountered:
At this time the whole check runs in a single thread. For larger API jsons (300+ paths) processing takes a while.
Simple math: 300paths * count of breaking changes checks. It does not scale much.
The processing can be launched in parallel
In
DefaultBreakChecker
return rules.stream().map(rule -> rule.checkRule(oldApi, newApi)).flatMap(Collection::stream).collect(toList());
with just a replacement of
stream()
intoparallelStream()
it runs faster...Unfortunately it has some possible side effects. The order of result list of breaking changes is unpredictable - that can be confusing for user. Therefore I also suggest to add a support for BreakingChange priority and to sort the result list by this value. Eg. PathRemoval breaking change can have higher order priority than others.
Also I am not sure about implementation of classes
SeenRefHolder, SchemaStoreProvider
which they are usingThreadLocal
.There are also other possible places for speed improvements. Eg. loading old and new api can be launched in parallel as well. With Project reactor it can be a piece of cake.
The text was updated successfully, but these errors were encountered: