Useing default-sized HashSet is wasteful, as we typically
have only a single requires/mutates action. This will lower
wastage which was observed to be around 600kB.
Change-Id: I642403858f2cab71c8896b2aa8a8cb0131306236
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit
9455adbdd7de21d8da1a3bf6919db7f36dfba165)
class ModifierImpl implements ModelActionBuilder {
private static final Logger LOG = LoggerFactory.getLogger(ModifierImpl.class);
- private final Set<AbstractPrerequisite<?>> unsatisfied = new HashSet<>();
- private final Set<AbstractPrerequisite<?>> mutations = new HashSet<>();
+ private final Set<AbstractPrerequisite<?>> unsatisfied = new HashSet<>(1);
+ private final Set<AbstractPrerequisite<?>> mutations = new HashSet<>(1);
private final ModelProcessingPhase phase;
private InferenceAction action;