Skip to content

Profiling support? #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lewiji opened this issue Feb 13, 2021 · 1 comment
Open

Profiling support? #88

lewiji opened this issue Feb 13, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@lewiji
Copy link
Contributor

lewiji commented Feb 13, 2021

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.

@lewiji
Copy link
Contributor Author

lewiji commented Feb 15, 2021

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.

@nmerget nmerget added the enhancement New feature or request label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants