# Scene optimizer not performing hardware scaling correctly

**URL:** <https://forum.babylonjs.com/t/scene-optimizer-not-performing-hardware-scaling-correctly/13491>\
**Category:** Questions\
**Created:** [August 19, 2020, 11:54am UTC](https://forum.babylonjs.com/t/scene-optimizer-not-performing-hardware-scaling-correctly/13491 "2020-08-19T11:54:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![devJamaly](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/devjamaly/32/9744_2.png) [@devJamaly](https://forum.babylonjs.com/u/devJamaly)\
**Post date:** [August 19, 2020, 11:54am UTC](https://forum.babylonjs.com/t/scene-optimizer-not-performing-hardware-scaling-correctly/13491/1 "2020-08-19T11:54:06Z")

</div>

trying to use the BabylonJS scene optimizer to improve performance on low-end devices with the following code :

const options = new BABYLON.SceneOptimizerOptions(60, 2000)  
options.addOptimization(new BABYLON.TextureOptimization(0, 512))  
options.addOptimization(new BABYLON.HardwareScalingOptimization(0, 2, 0.25))  
console.log(options)  
const optimizer = new BABYLON.SceneOptimizer(  
SceneController.scene,  
options,  
false,  
false  
)  
optimizer.start()

```
optimizer.onSuccessObservable.add(function() {
  console.log('===============SUCEEDED IN OPTIMIZING====================')
})
optimizer.onNewOptimizationAppliedObservable.add(function(optim) {
  console.log(
    '====================APPLIED OPTIMIZATIONS======================'
  )
  console.log(optim.getDescription())
})
optimizer.onFailureObservable.add(function() {
  console.log('===============FAILED IN OPTIMIZING====================')
  console.log(optimizer.currentFrameRate)
})

```

The optimizer starts and applies optimizations. However the hardware scaling applied is always (-1). Can anyone help me with this issue. Any suggestions are welcome

Regards,  
Taha

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [August 19, 2020, 3:31pm UTC](https://forum.babylonjs.com/t/scene-optimizer-not-performing-hardware-scaling-correctly/13491/2 "2020-08-19T15:31:59Z")

</div>

can you repro in the playground? Just set a target to 90fps 🙂
