The main reason for this optimization is editing TweakDB. Flats are stored in a sorted unique array with over 2M entries. Flat insertion is expensive and adds up quickly when creating/cloning records with many properties.
The new method allows batch insertions. The bigger the batch, the bigger the gain.
N of insertions
Avg. boost
10
8x
100
25x
1000
170x
With this optimization applied to creating/cloning records, a real mod that adds items shows around 20x faster load times (each item record has 80-110 properties).
The main reason for this optimization is editing TweakDB. Flats are stored in a sorted unique array with over 2M entries. Flat insertion is expensive and adds up quickly when creating/cloning records with many properties.
The new method allows batch insertions. The bigger the batch, the bigger the gain.
With this optimization applied to creating/cloning records, a real mod that adds items shows around 20x faster load times (each item record has 80-110 properties).