Skip to content

IGE-ES6 - Default behavior of _resizeEvent on IgeObject causes performance hit #468

@beyond-code-github

Description

@beyond-code-github

By default every IgeObject gets an implementation of _resizeEvent that loops each child entity and calls their _resizeEvents in turn:

_resizeEvent: function (event) {

For a basic Isometric tile game with hundreds of entities belonging to a tilemap, this causes a significant lag each tick as we iterate every child but then take no action as nothing needs to respond to these events other than the scene, viewport etc which already have their own overrides for _resizeEvent anyways.

In my fork, I've simply commented out this entire method which has improved performance with no side effects but as I have a limited use-case I was wondering what a better solution to this might be before I sent a PR that might break things for others. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions