Editor freeze/memory leak when having many array values

How to reproduce:

  1. Create a struct that contains an array of Transforms
  2. Create a DataTable of this struct
  3. In a new Blueprint, generate large amount (let’s say 5-10k) of Transforms, e.g. by For Loop in Construction Script and add all the generated transforms into a public array variable (to be able to Copy the values from editor)
  4. Place the blueprint into a scene and in its details panel right click on the transform array variable (it should have many generated transfom values inside) and click Copy.
  5. Create a new row in the DataTable and right click → Paste the values into it.
  6. This action will cause a major lag, in my case freezing my whole PC for 1-2 minutes. During the freeze, RAM usage peaks incredibly high, it takes almost all of my 8GB memory.

When pasting these values to e.g. a text file, there is no lag at all. Why it behaves differently with DataTable and causes this big freeze? The freeze will appear also when re-opening the saved DataTable, but no freeze when we close it. Why does it need so much RAM to only paste/display the values? This looks like some memory leak…

BTW. I’m not the only one experiencing the major slowdown when having many values in blueprints: Storing large lists (arrays) in blueprints? - Blueprint - Unreal Engine Forums

Thanks!

Hi Slavq,

Yeah, this is expected when dealing with really large numbers of values. The severity of the lag is of course dependent on your hardware but there isn’t really a way to avoid it using the workflow you described. But it also seems that you would only need to do it once per Data Table you create.

As everynone explains in that Forum thread, it would be best to use the .csv file method when dealing with this many Member Variables.

Cheers,

TJ