Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[1.3.12rc2] GCODE viewer: cloneDeep eats way too much memory on anything but simple models #3277
Deep cloning the whole GCODE model in order to avoid issues with regards to accidentally filtered layers turns out to be a decidedly bad idea as it will increase memory consumption in a quite drastic way, leading to models no longer rendering on regular hardware that before had no issues.
See also #3275 (comment)
Since we only do manipulation of the model on layer filtering and ordering level, we can get away with simply creating shallow copies with rearranged/filtered layers. No need to do a full deep copy.