BeRo1985 / pasvulkan

Vulkan header generator, OOP-style API wrapper, framework and prospective Vulkan-based game engine for Object Pascal
zlib License
193 stars 31 forks source link

idea for better png loading time performance #17

Closed codz01 closed 4 years ago

codz01 commented 4 years ago

Hi Bero based on discussion in (https://forum.lazarus.freepascal.org/index.php/topic,49940.msg363534/topicseen.html) I've tried moving some local vars (used by nested proc/fun ) and make them global in (PasVulkan.Image.PNG.pas) . the loading speed is increased about 25% \o/

BeRo1985 commented 4 years ago

Unfortunately this suggestion prevents the use in multithreaded situations, where the PNG loader code is called in many CPU threads parallel at the same time, so it is not a practical solution.