practical-tools-for-simple-design icon indicating copy to clipboard operation
practical-tools-for-simple-design copied to clipboard

Investigate resource loading potential optimization

Open NOOBDY opened this issue 1 year ago • 5 comments

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

NOOBDY avatar Dec 21 '23 08:12 NOOBDY

prototype: https://github.com/ntut-rick/ptsd/commit/48f8a05ee4e91bf7adb26e378883b9b5807f68db

ntut-rick avatar Feb 03 '24 08:02 ntut-rick

added in #102

NOOBDY avatar Mar 31 '24 14:03 NOOBDY

  • #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?

ntut-rick avatar Apr 02 '24 15:04 ntut-rick

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 using unordered_map?

Update: It's only happen in #162, I will move the discussion to there

ntut-rick avatar Apr 02 '24 16:04 ntut-rick

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 using unordered_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

ntut-rick avatar Apr 03 '24 09:04 ntut-rick