[SOLVED] Performance issues with 4.0.0-beta.6...4.0.0-beta.7

was testing babylonjs 4 and found out that starting from 4.0.0-beta.7 I have weird slowdown in the game (after massive instance creation + DynamicTexture updates), now trying to understand what exactlly happening there. Anything special was done there, what I should pay attention, to shorten field of search ? :slight_smile:

Made diff.
Will post as soon as have more information.

Version: 4.0.0-beta.7
Device: iPhone XS
OS: iOS 12
browser: Safari

Thank you

I wonder if thatโ€™s the same issue Iโ€™m having with beta.4?
Are you sure itโ€™s beta.6? + do you see the same symptoms?

Hi, @kutomer yes I pinpointed it to beta7, as beta6 works well, now trying to find out what exactly was changed there

can you repro in the pg?

also did you try with rc3?

@Deltakosh Yes tried with RC3, till now found out that glow layer + lots of instances are causing the issue, they should be excluded from glow so created filter function, maybe something wrong with it now:

private createGlow() {
        const glowLayer = new GlowLayer("glow", this.getScene(), {
            mainTextureSamples: 2,
        glowLayer.intensity = 1.2;
        glowLayer.customEmissiveColorSelector = (mesh, subMesh, material: StandardMaterial, result) => {
            result.set(0, 0, 0, 0);
            if (
                mesh.name.indexOf("some-mesh") === 0
                && material.emissiveColor
            ) {

Will investigate further

pinging @sebavan
if you can repro in the pg that would be ideal for us to fix it

I think we nailed it


@Deltakosh thank you, tested on 4.0.3 works fine now :slight_smile:
what was happening there ?

we introduced an optimization for isntances but we missed to add it to the rendertargets :slight_smile: