TilePool
public class
loom.modestmaps.core.painter.TilePool
Description
This post http://lab.polygonal.de/2008/06/18/using-object-pools/ suggests that using Object pools, especially for complex classes like Sprite is a lot faster than calling new Object(). The suggested implementation uses a linked list, but to get started with it here I'm using an Array.
If anyone wants to try it with a linked list and compare the times, it seems like it could be worth it :)
API overview
Constructor
TilePool
(
tileCreator: Function
)
Attributes
Protected attributes
Constructor
TilePool ( tileCreator: Function )
Attributes
Protected attributes
Constants
Functions
getFullTypeName
(): String
Inherited from Object
native
Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.
Returns
| String | fully qualified type name of the Object. |
getTile ( column: Number , row: Number , zoom: Number ): Tile
Parameters
| column: Number | |
| row: Number | |
| zoom: Number |
getType
(): Type
Inherited from Object
native
Gets the Type that describes the Object.
Returns
| Type | The Type that describes the object. |