practical-tools-for-simple-design
practical-tools-for-simple-design copied to clipboard
Investigate resource loading potential optimization
Currently loading the same file from two different objects won't share resources, there is also no way to change the image other than creating a new object
prototype: https://github.com/ntut-rick/ptsd/commit/48f8a05ee4e91bf7adb26e378883b9b5807f68db
added in #102
- #102 seems can't saving memory like https://github.com/ntut-rick/ptsd/commit/48f8a05ee4e91bf7adb26e378883b9b5807f68db.
In a test with 5k giraffes (same testing as #162, on my windows laptop), it used 5GB of RAM. https://github.com/ntut-rick/ptsd/commit/48f8a05ee4e91bf7adb26e378883b9b5807f68db used only 400MB.
Could you consider whether Core::Texture
could be optimized using unordered_map
?
- Asset Manager #102 seems can't saving memory like ntut-rick@48f8a05.
In a test with 5k giraffes (same testing as #162, on my windows laptop), it used 5GB of RAM. ntut-rick@48f8a05 used only 400MB.
Could you consider whether
Core::Texture
could be optimized usingunordered_map
?
Update: It's only happen in #162, I will move the discussion to there
- Asset Manager #102 seems can't saving memory like ntut-rick@48f8a05.
In a test with 5k giraffes (same testing as #162, on my windows laptop), it used 5GB of RAM. ntut-rick@48f8a05 used only 400MB.
Could you consider whether
Core::Texture
could be optimized usingunordered_map
?
BTW, It won't happen on my desktop:
[info] OpenGL Info
[info] Vendor: NVIDIA Corporation
[info] Renderer: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
[info] Version: 4.1.0 NVIDIA 551.61
[info] GLSL Version: 4.10 NVIDIA via Cg compiler
but my laptop:
[info] OpenGL Info
[info] Vendor: Intel
[info] Renderer: Intel(R) Iris(R) Xe Graphics
[info] Version: 4.1.0 - Build 30.0.101.1340
[info] GLSL Version: 4.10 - Build 30.0.101.1340