Open smmalis37 opened 4 years ago
MSDN has this to say: "In general, you should create geometries once and retain them for the life of the application, or until they need to be modified."
https://docs.microsoft.com/en-us/windows/win32/api/d2d1/nn-d2d1-id2d1geometry
Admittedly my test case (https://github.com/smmalis37/sudoku_rust) with over 700 labels visible at once may be a bit extreme, but this shows up in profiling as one of the most expensive functions throughout the whole app. This is due to a combination of things: