# Glb with huge texture load much slower in 5.0.0

**URL:** <https://forum.babylonjs.com/t/glb-with-huge-texture-load-much-slower-in-5-0-0/26025>\
**Category:** Questions\
**Created:** [December 13, 2021, 11:20am UTC](https://forum.babylonjs.com/t/glb-with-huge-texture-load-much-slower-in-5-0-0/26025 "2021-12-13T11:20:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanpopo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tanpopo/32/32025_2.png) [@tanpopo](https://forum.babylonjs.com/u/tanpopo)\
**Post date:** [December 13, 2021, 11:20am UTC](https://forum.babylonjs.com/t/glb-with-huge-texture-load-much-slower-in-5-0-0/26025/1 "2021-12-13T11:20:06Z")

</div>

Hi there, I’m trying to load a glb with a texture which is 8k / 80M, It takes about 3s to load in 4.2.0 while about 15s in 5.0.0(alpha63).

The performance record shows that the time is mainly cost by `getError`, but even if I rewrite the `_compileRawShader` function to skip the `getError`, the load time didn’t reduce(2nd picture).  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/d/f/dfc24820305fe9ba23b6c0ed9e2444332a4cbf8d.png)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/3/a/3acd8a4aa40b5751f34eb990e3307485fab663ce.png)

Actually I’m not sure if it is the question with BJS as I found the similar problem in 3js v88 / v134.

[a demo glb.](https://github.com/Hypnosss/file-bed/blob/maste/bigTexture.glb)

UPDATE:  
After test, the width / height of the texture effects more on the load time than size.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 13, 2021, 10:38pm UTC](https://forum.babylonjs.com/t/glb-with-huge-texture-load-much-slower-in-5-0-0/26025/2 "2021-12-13T22:38:51Z")

</div>

This is about the color space of the texture and an internal bug in Chrome open from quite some times now ☹

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [January 12, 2022, 11:42am UTC](https://forum.babylonjs.com/t/glb-with-huge-texture-load-much-slower-in-5-0-0/26025/3 "2022-01-12T11:42:07Z")

</div>

Hi @tanpopo ! We’ve recently merged an issue related to slow loading times on 5.0.0 [Added option to force sRGB Buffer support state by RaananW · Pull Request #11758 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/pull/11758) can you update your project to check if it helps in your case too? 😄

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [January 12, 2022, 12:00pm UTC](https://forum.babylonjs.com/t/glb-with-huge-texture-load-much-slower-in-5-0-0/26025/4 "2022-01-12T12:00:33Z")

</div>

There is no npm version with the fix yet, I am updating the preview release as we speak.

---

<div class="post-metadata">

**Author:** ![tanpopo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tanpopo/32/32025_2.png) [@tanpopo](https://forum.babylonjs.com/u/tanpopo)\
**Post date:** [January 13, 2022, 1:30am UTC](https://forum.babylonjs.com/t/glb-with-huge-texture-load-much-slower-in-5-0-0/26025/5 "2022-01-13T01:30:57Z")

</div>

@carolhmj @RaananW, I didn’t clone the preview release but turn off `supportSRGBBuffers` and the problem is solved, Thank you!
