GBC Object Pool - Now in the Marketplace!

My latest plugin, GBC Object Pool, is now in the marketplace.

The GBC Object Pool plugin allows the CoronaSDK developer to easily and quickly implement object pooling within your application. Using two lines of code, you can create an object pool. GBC Object Pool optimizes the management of pooling, allowing for object reuse and eliminates garbage collection inherently found with traditional create/destroy functions.

 

The plugin provides several examples of pooling.  If there are any questions or requests, please let me know. I plan on writing more examples, blogs, and perhaps some videos on the  use of this plugin.

 

Some links:

 

GBC Object Pool in the Corona Marketplace

Link to documentation

Link to example code

 

Thanks,

–John

I recently ran some metrics.

–john

Update pushed to Marketplace.

More examples added.

Additional articles written.

If there is any interest in videos, please let me know.

Version 1.2 added

– Fixes error when using autoexpand feature

Thanks John. I’m hoping this will along with other changes improve the responsiveness of my game on slower windows machines, particularly those with IDE drives.

Hey John,

Are the performance bonuses less obvious on mac and iOS because slowest apple devices maintain a level of processing and graphics power much higher than low-end Windows and Android devices?

I would be interested in seeing a video for sure.  No rush, I purchased the plugin but I probably won’t implement it for while.

Hi, and thanks for your purchase Sharp100… I appreciate it.

I ran some performance metrics on Windows and Android and I blog about it here.  I can also give it a try on iOS and OSX, and I can publish those results.  As for videos, I can give that a shot as well… I’ve been thinking about it a bit.  :slight_smile:

The results in the test I performed show that object pooling in general (and the GBC Object Pool plugin to be specific) is faster than the typical create/destroy methods used without pooling.  Pooling eliminates the overhead of allocating memory and garbage collection during the create/destroy cycle.  You can see that pooling results in more consistent performance as well.  The wide dispersion on times using create/destroy as shown in the charts may cause an issue when a user is playing your game… they might notice stutters or delays.

I have a sample app with source code that shows object pooling in action (located here), and it’s free to download.  The first scene is a performance test, and you will see that the type of object you want to pool will impact performance.  For example, creating/destroying a simple white square shape will probably not show significant performance gains using pooling (in other words, Corona is pretty good at doing that).  

Where pooling (and my plugin) really improves performance is in creating pools of images, optional physics properties, and/or complex objects.

Hope this helps.  If anyone has questions, please let me know.

–John

Yes, that’s very helpful and I have an app with lots of physics bodies that lags on Android devices.  This should definitely help!  Your language cabinet looks cool too.  I look forward to trying that plugin as well.

-Jonathan

John,

Don’t know if you saw my e-mail yet, having another issue with the autoexpand feature whereby more than the specified number of objects are created, which exponentially increases each time the pool runs dry.

Nick

Sorry Nick… I will check into this right now.

I think we go it this time!  :slight_smile:

Thanks to Nick for helping me track down the issue.  New version on the Marketplace.

An update to GBC Object Pool is now in the Marketplace.  This update enables a way to pass a table of parameters to your create and reset functions, which helps reduce the amount of code needed to manage your pools.  You can read about it in more detail here:

GBC Object Pool Update - Parameters

Examples and Source Code

–john

I recently ran some metrics.

–john

Update pushed to Marketplace.

More examples added.

Additional articles written.

If there is any interest in videos, please let me know.

Version 1.2 added

– Fixes error when using autoexpand feature

Thanks John. I’m hoping this will along with other changes improve the responsiveness of my game on slower windows machines, particularly those with IDE drives.

Hey John,

Are the performance bonuses less obvious on mac and iOS because slowest apple devices maintain a level of processing and graphics power much higher than low-end Windows and Android devices?

I would be interested in seeing a video for sure.  No rush, I purchased the plugin but I probably won’t implement it for while.

Hi, and thanks for your purchase Sharp100… I appreciate it.

I ran some performance metrics on Windows and Android and I blog about it here.  I can also give it a try on iOS and OSX, and I can publish those results.  As for videos, I can give that a shot as well… I’ve been thinking about it a bit.  :slight_smile:

The results in the test I performed show that object pooling in general (and the GBC Object Pool plugin to be specific) is faster than the typical create/destroy methods used without pooling.  Pooling eliminates the overhead of allocating memory and garbage collection during the create/destroy cycle.  You can see that pooling results in more consistent performance as well.  The wide dispersion on times using create/destroy as shown in the charts may cause an issue when a user is playing your game… they might notice stutters or delays.

I have a sample app with source code that shows object pooling in action (located here), and it’s free to download.  The first scene is a performance test, and you will see that the type of object you want to pool will impact performance.  For example, creating/destroying a simple white square shape will probably not show significant performance gains using pooling (in other words, Corona is pretty good at doing that).  

Where pooling (and my plugin) really improves performance is in creating pools of images, optional physics properties, and/or complex objects.

Hope this helps.  If anyone has questions, please let me know.

–John

Yes, that’s very helpful and I have an app with lots of physics bodies that lags on Android devices.  This should definitely help!  Your language cabinet looks cool too.  I look forward to trying that plugin as well.

-Jonathan

John,

Don’t know if you saw my e-mail yet, having another issue with the autoexpand feature whereby more than the specified number of objects are created, which exponentially increases each time the pool runs dry.

Nick