question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

r133 getProgramInfoLog performance issue

See original GitHub issue

Description

When benchmarking r132 vs r133 on the same project, the first frame that initialise things with ProgramInfoLog is six times slower in r133.

To Reproduce

Steps to reproduce the behavior:

  1. Use one of your existing three scene or project
  2. Change the build from r132 to r133 r132 : https://raw.githubusercontent.com/mrdoob/three.js/r132/build/three.min.js r133 : https://raw.githubusercontent.com/mrdoob/three.js/r133/build/three.min.js

Code

<script src="https://raw.githubusercontent.com/mrdoob/three.js/r132/build/three.min.js"></script>
<!-- VS -->
<script src="https://raw.githubusercontent.com/mrdoob/three.js/r133/build/three.min.js"></script>

Screenshots

r125 : ( performance are stable ) up to r132 r125

r133 : six time slower ( average ) r133

Platform:

  • Device: [Desktop]
  • OS: [Windows]
  • Browser: [Chrome]
  • Three.js version: [r133]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
vanruesccommented, Oct 20, 2021

This could be related to #22631. getProgramInfoLog() might appear to take longer because texImage2D is blocking.

@swingingtom Do you use sRGBEncoding for the textures in your scene? Try using the WebGL1Renderer to check if loading times return to normal.

0reactions
swingingtomcommented, Oct 21, 2021

@vanruesc I confirm this is related to https://github.com/mrdoob/three.js/issues/22631

Changing texture.encoding = sRGBEncoding; for something else, or keeping sRGBEncoding and switching to WebGL1Renderer resolve the blocking time on r133.

Read more comments on GitHub >

github_iconTop Results From Across the Web

10x shader compilation time regression from r132 to r133 ...
If the regression disappears by using WebGL1Renderer , SRGB8_ALPHA8 is the problem. I'm not sure why getProgramInfoLog() shows an increase in ...
Read more >
getProgramInfoLog performance issue - three.js forum
Hi All, I have a very basic scene with 3 objects and I remarked that the threejs loads very slowly, it is strange...
Read more >
THREE.WebGLProgram: shader error: gl.getProgramInfoLog ...
Better not to use texture as a name of a uniform, as three.js internally substitutes it and uses as a function.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found