How to detect low performance device in runtime react native
Asked Answered
A

3

6

I want to detect low performance device in runtime in react native to disable complex lottie animation. I consider for use device model from react-native-device-info, but I should have a list of heigh performance phones

Amortization answered 11/7, 2018 at 13:46 Comment(0)
R
1

I'm also interested in this question and it would be fine to have some solution. I can think of using react-native-device-info and comparing following properties of device:

  1. CPU architecture (32/64 bit)
  2. total RAM available
  3. total disk capacity
  4. current android version

Maybe using these variables we are able to calculate some performance level with not that bad accuracy.

64bit + lets say at least 3GB RAM + 32GB capacity + one of newer Android version can be good indication that device should have some power inside.

on the other hands 32bit + 1/2GB RAM + max 8/16GB capacity + not that new Android version can lead to performance prblms.

Seriously let's talk about it :D Maybe we can find some good compromise and maybe write a lib or contribute to react-native-device-info with a feature that will try to suggest developers about device's performance.

Rask answered 7/10, 2019 at 14:58 Comment(1)
Did you find a solution?Resinoid
A
0

consider use android version we use this formula: low android version === old phone === low performance

performance can be low if device is out of memory, too many applications opened, which browser used, etc... its hard to detect

when is neccesary, you can write small performance test in app before animations or on app load/initialization, and you can use these results.

Acnode answered 11/7, 2018 at 13:53 Comment(1)
I don't have a good solution, but I want to add that this isn't a solid approach because users can update quite old physical devices to very new android.Pippin
A
0

It's possible to run any benchmark in background using web worker or use library like fireball-js, then compare the score.

Amortization answered 4/10, 2020 at 19:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.