Ultimaker / CuraEngine

Powerful, fast and robust engine for converting 3D models into g-code instructions for 3D printers. It is part of the larger open source project Cura.
https://ultimaker.com/en/products/cura-software
GNU Affero General Public License v3.0
1.66k stars 876 forks source link

[CURA-11019] fix slowdown better solution #1951

Closed rburema closed 10 months ago

rburema commented 10 months ago

Fix slowdown issue due to copy of large data.

Since make_shared is a constructor, the mesh data was copied over each time we started a new layer. Properly fix this by using smart-pointers from the beginning, so we only have the creation overhead, which is nearly nothing. In fact, this solution may be faster than the original, perhaps due to some constness that is now also enforced.

Supersedes #1950

github-actions[bot] commented 10 months ago

Unit Test Results

26 tests   26 :heavy_check_mark:  12s :stopwatch:   1 suites    0 :zzz:   1 files      0 :x:

Results for commit 74456d08.

:recycle: This comment has been updated with latest results.