I moved to my own topic, so your announcement is not all clogged with this.
@carolhmj Is there a way to display the performance profiler directly from code? I’ve tried to trace through the code to see how it is being done from the PG, but I am having trouble tracing instantiation of the component through the various abstraction layers.
We had plans for a “standalone” version of the Performance Profiler that could be displayed directly on the scene without the need for a Inspector, but unfortunately, we don’t have resources for that right now.
Can you summarize what would need to be done to make this happen? I might be willing to take it on.
Sure! Most of the components used in the performance profiler are here as part of the inspector package: Babylon.js/packages/dev/inspector/src/components/actionTabs/tabs/performanceViewer at master · BabylonJS/Babylon.js (github.com) and Babylon.js/packages/dev/inspector/src/components/graph at master · BabylonJS/Babylon.js (github.com). @RaananW do you think they should be moved to their own package, so the user wouldn’t need to import the entire inspector package just to render the profiler?
Anyways, no matter the package, you would then need to create some function to either open a Popup window with the profiler (similar to what Inspector.CreatePopup is doing), or instantiate a new canvas and draw the graph there. We discussed a bit about this in this issue [Performance viewer] add a standalone performance viewer UI · Issue #11127 · BabylonJS/Babylon.js (github.com), and there’s a closed PR with a draft implementation I started there.
Awesome, thanks. Exactly what I needed.
Sure. We need to put some thought behind how to render it externally, but I don’t see why it can’t be an external package. Want to create an issue for me?