Skip to content
Unverified Commit 6797173c authored by Steven Perron's avatar Steven Perron Committed by GitHub
Browse files

Don't register duplicate decoration in validator. (#2841)

As far as I know, it is legal to have multiple decoration adding the
same decoration to the same id.  The validator registers all of these
decoration as if they were distinct decorations.  This can cause poor
memory usage and performance in some cases.

This fix is to make sure that duplicates are not registers.

I keep the type of the decoration list as an std::vector because I
expect it to be small enough in most cases that the linear search will
still be faster that using some type of map.

No tests are added because we do not have a mechanism to test memory
usage in our unit tests.

Fixes #2837.  The total memory usage drop to 14,236KB.
parent 76261e2a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment