Commit 8bda67d
committed
fix: Store DirectX feature level as the enum internally for performance
This has impact on performance because the Enum.Parse function allocates a lot of memory each time it is called, so instead of calling that repeatedly it is now only called when the feature level is set.
This results in a drop of 21% in TOTAL allocations in a simple profiling run (load activity and exit after 1000 frames are rendered), and a drop of 57% (!) in allocations post-loading.1 parent 0dc5a2c commit 8bda67d
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
364 | 365 | | |
365 | 366 | | |
366 | 367 | | |
367 | | - | |
368 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
| |||
0 commit comments