Search code examples
angularjshardware-accelerationangular-material

Can I enable hardware acceleration for Angular Material?


The current version does not seem smooth and fast. Even a simple app lags on a general phone (except the iPhone).

Is that because the hardware acceleration is not enabled? Or just that the hardware of the phones are not good enough?

If I want hardware acceleration, do I have to edit the sources?


Solution

  • Problem is not with angular-material, you need to check your code.

    Talking about hardware acceleration, you can force hardware acceleration with help of css.

    Add this css class to body

    .accelerate {
        -webkit-transform: translate3d(0,0,0);
        -moz-transform: translate3d(0,0,0);
        -ms-transform: translate3d(0,0,0);
        -o-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
     }
    

    Read more about hardware acceleration hardware acceleration on smashing magazine