Skip to content

Group.removeEmitter Performance #124

@titansoftime

Description

@titansoftime

I have a particle group with 80 emitters attached (clouds). After an emitter has existed for about 3 minutes I remove the emitter. Unfortunately each Group.removeEmitter call takes between 200 - 300ms on my 3 year old desktop. This of course freezes the app.

This is the culprit code (line 2260):

for ( var attr in this.attributes ) {
    if ( this.attributes.hasOwnProperty( attr ) ) {
        this.attributes[ attr ].splice( start, end );
    }
}

I can just comment this out and all "seems" fine, though I'm sure there is a resulting memory leak (haven't tested).

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