Skip to content

Profiling support? #88

Open
Open

Description

@lewiji

Is there any way to profile Godot ECMAScript code? Either in the editor, or by some other means?

From a quick read of the source I don't think the profiling methods have been implemented, but is there some way to attach a different debugger than the Godot one? Or maybe even by running a build of the engine source and attaching a C++ debugger to that. Has anyone had any success?

Thanks.

Activity

  1. lewiji commented on Feb 15, 2021

    @lewiji
    ContributorAuthor

    FWIW, I tried Valgrind but couldn't get much useful information out of it down to the level of individual JS functions.

    I've instead just made a simple decorator for now that allows you to add @measure to functions in your TS project, and if you add the Performance.jsx script as autoload in your project, it will print microsecond-accurate timing info (in ms) to the Godot output.

    You can also call the time and endTime functions directly to collect and record the timing information.

    https://github.com/lewispollard/godot-ecma-perftools

    It would be nice to support in-editor profiling but unsure what steps would need to be taken, for now this will do for my simple purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions