# Performance of ScreenLoader.Append in BabylonNative (Android)

**URL:** <https://forum.babylonjs.com/t/performance-of-screenloader-append-in-babylonnative-android/18369>\
**Category:** Questions\
**Tags:** native\
**Created:** [February 11, 2021, 11:50pm UTC](https://forum.babylonjs.com/t/performance-of-screenloader-append-in-babylonnative-android/18369 "2021-02-11T23:50:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwbrown](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jwbrown/32/13613_2.png) [@jwbrown](https://forum.babylonjs.com/u/jwbrown)\
**Post date:** [February 11, 2021, 11:50pm UTC](https://forum.babylonjs.com/t/performance-of-screenloader-append-in-babylonnative-android/18369/1 "2021-02-11T23:50:59Z")

</div>

I am using `SceneLoader.Append` to load a gltf file exported from Blender. The file is 628Kb and includes some animations.

I am comparing BabylonNative on Android with BabylonJS in an Android Webview. It takes over 30 seconds to load in BN and under 2 seconds in BJS. By “load” I mean from the Append call until the onSuccess callback is invoked.

Based on this [forum post](https://forum.babylonjs.com/t/markmaterialasdirty-performance-issues-with-high-mesh-count-and-scene-loading-optimization/1304), I tried setting `scene.blockMaterialDirtyMechanism = true`, and that reduced the load time in BN to about 20 seconds.

Is there something else going on here? Is this expected at this point?

Thanks

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [February 12, 2021, 1:40am UTC](https://forum.babylonjs.com/t/performance-of-screenloader-append-in-babylonnative-android/18369/2 "2021-02-12T01:40:11Z")

</div>

Are you running in debug or release? Do you have any textures in the gltf file?

---

<div class="post-metadata">

**Author:** ![jwbrown](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jwbrown/32/13613_2.png) [@jwbrown](https://forum.babylonjs.com/u/jwbrown)\
**Post date:** [February 22, 2021, 9:55pm UTC](https://forum.babylonjs.com/t/performance-of-screenloader-append-in-babylonnative-android/18369/3 "2021-02-22T21:55:46Z")

</div>

Debug. Yes, most of the file is base64 texture data.

I’ve tried both loading the gltf from a file in the app assets and downloading it from a local server.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [February 22, 2021, 10:30pm UTC](https://forum.babylonjs.com/t/performance-of-screenloader-append-in-babylonnative-android/18369/4 "2021-02-22T22:30:22Z")

</div>

Debug is going to be quite slow because mipmap generation is rather slow in debug. Can you try release and see if it’s better?

---

<div class="post-metadata">

**Author:** ![jwbrown](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jwbrown/32/13613_2.png) [@jwbrown](https://forum.babylonjs.com/u/jwbrown)\
**Post date:** [February 22, 2021, 11:45pm UTC](https://forum.babylonjs.com/t/performance-of-screenloader-append-in-babylonnative-android/18369/5 "2021-02-22T23:45:13Z")

</div>

Yes. It takes 3-4 seconds in the release build.

Is there a way to disable something to speed up the debug build?

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [February 23, 2021, 1:05am UTC](https://forum.babylonjs.com/t/performance-of-screenloader-append-in-babylonnative-android/18369/6 "2021-02-23T01:05:48Z")

</div>

If you hard code [this line](https://github.com/BabylonJS/BabylonNative/blob/095dd8e994ae1f2c359d844e88e0efe6580d7f32/Plugins/NativeEngine/Source/NativeEngine.cpp#L1036) to false, then it will be faster, but you won’t get mipmaps. Hopefully, that’s not going to affect the scenario too much.
