Performance: the other way around?

Hi,
Wouldn’t it be nice to have a “performance mode”, with all the trick enabled by default to perform as much as possible?

I mean, BJS is really nice but the default needs to read the performance upgrade part of the doc to disable many options… doc: performance tips
Rather, starting minimal and performant, and increase the complexity as needed, rather than the -current- other way around, could be a nice addition.

Just thinking…

Hey @Julien1 - Welcome to the Babylon Family! We’re sincerely happy to have you here.

This is an interesting suggestion. I think it’s tricky to assume that everyone who comes will want all of the performance tricks going right out of the gate, however I like the idea of a switch you could through to turn everything like that on automatically. I honestly wouldn’t be surprised if something like this already exists.

Adding @sebavan, @Deltakosh, and @Evgeni_Popov who are all experts in perf. They can probably provide some thoughts, guidance.

1 Like

Hello and welcome to the Babylon community! I feel like SceneOptimizer The Scene Optimizer | Babylon.js Documentation (babylonjs.com) is a great tool for that, and we could take advantage of it a bit more, maybe even by adding a simple call on the main Scene class :slight_smile:

Thanks for your welcoming, really appreciated.
I will look into the scene optimizer.

I kept reading the -very well made- doc and stumbled upon matrix freezing. Maybe a default freeze with a switch to enable it on could also help further optimization: there are often more static objects in a world than moving.

Again, I feel at home here already, but I also want to be honest.

I will keep watching this thread, just in case :slight_smile:

Thanks a lot guys!

Most of the optimizations come with trade-offs… For instance if you are using material.freeze you should avoid doing it on any materials with isRefractionEnabled=true, and changing environment map intensity with a scene of frozen materials and freezeActiveMeshes enabled will cause all the meshes to vanish.

These optimizations really shouldn’t be applied universally in most cases, which is why there is a guide that goes over the basics of using them. The documentation and strategy for using them could be improved upon though… Especially when it comes to caveats.

I agree. For me, I remember having such a comprehensive doc really made the difference when I first chose to investigate BJS. I believe maintaining and enhancing the doc in the same spirit will be key to the success of involving more people to use BJS (along with the forum, PG and sandbox of course).

True. Hard to find a ‘suits all’ tweak of global parameters that will not eventually create other issues (or simply have no effect in terms of performance)

Yes, I think so. May be the community should start delivering suggestions to further enhance the (well named but rather minimal) ‘performance tips’ section?

1 Like

We love suggestions and help from the community! Writing comprehensive and easy to follow docs is a continuous work, there’s always something to improve xD

I really love this community and for the info I chose to develop my app with BJS (I know nobody cares but this lib + community are awesome)

3 Likes

facebookwatch i care GIF by SKAM Austin

3 Likes