love.graphics.newQuad not so slow?
Posted: Sat May 04, 2013 4:35 pm
Was surprised by two things.
The WIKI says the love.graphics.newQuad is:
The second surprise was when trying to accomplish the same effect using imageData and paste.
This approach was slower and resulted in a continuous increase in memory usage - ultimate ending in the script stopping dead in the water due to lack of memory. Had to add a garbagecollection step (with resulting periodic hic-up.)
Thought garbagecollection would have been done automatically.
The WIKI says the love.graphics.newQuad is:
I guess 'slow' is a relative term - see demo."This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused! "
The second surprise was when trying to accomplish the same effect using imageData and paste.
This approach was slower and resulted in a continuous increase in memory usage - ultimate ending in the script stopping dead in the water due to lack of memory. Had to add a garbagecollection step (with resulting periodic hic-up.)
Thought garbagecollection would have been done automatically.