Native ui component drops frames on some phones

90 Views Asked by At

I am trying to work around the shadow limitation on react native for android. Basically I need box shadows. My solution was to build a native ui component (java) with which I can create box shadows.

Now I ran into a weird bug. In a bare minimum app, with nothing but just some navigation and the box shadow ui components, the navigation is extremely laggy/ drops frames, when the app has to load the box shadow component.

The weird thing is. This just happens on some phones. From my tests so far I can say the native component runs smoothly on:

  • Fairphone 3 (Snapdragon),
  • Samsung galaxy s21 (Snapdragon) and
  • xiaomi redmi note 9 (Snapdragon)

The app drops frames on:

  • Samsung galax s41 (Mediatek)
  • Huawei mate 20 (Kirin)
  • Samsung galaxy s7 (Snapdragon)

Does anyone have an idea what the Problem could be? Does it perhaps have something to do with the CPU? I am really gratefull for every tip and idea. I really have no idea what the Problem could be. Thanks!

1

There are 1 best solutions below

1
On

You have a problem of optimization.

Try to do a Profiling of your app on different phones to find the process that is more time consuming.