Skip to content

Encountering significant script execution time on StateMachine.advanceStateMachine and StateMachine.getReportedEventCount #135

@postmemetic

Description

@postmemetic

We have a scene in which we are sometimes displaying several animating characters at once on a UGUI Canvas set to worldspace render mode. On modern desktop computers with fast CPU's, we are encountering significant CPU usage resulting in framerate drops from 60 to 40 with around 10 characters on-screen. On iOS and Android, we are seeing far worse results, with noticeable slowdown even on 3 or so characters. The majority of CPU time is spent within two function calls to the native libraries:

Image

StateMachine.advanceStateMachine specifically hits high CPU usage during LateUpdate

Image

StateMachine.getReportedEventCount spikes CPU usage during Update

We are observing the issue with the current Unity package release (0.3.9-canary.57), as well as with the latest tag (v0.3.9-canary.170), which we pulled down manually and integrated for performance comparison tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions