Chrome performance - SVG animation high CPU

Hi!
I have noticed that especially when there are no results the “magnifying glass” SVG is shown the Forest Admin tab really takes a lot of CPU cycles. It’s near 80% on my machine and slows down the work across all browser windows.

image

I have profiled the tab and it seems like the work is around the SVG “setAttribute” call that drives the animation.

image

Moving to view a collection with results drops CPU from 80% to 20% for example.

Expected behavior

No need to consume rendering resources when not using Forest - especially when no results are shown.

Actual behavior

High CPU is observed.

Context

Please provide any relevant information about your setup.

  • Chrome Version: 81.0.4044.138 (Official Build) (64-bit)
  • OS: Mac osx - 10.15.4 (19E287)

Thanks!

2 Likes

Hi @Yoad_Snapir,

Forest Admin UI uses Lottie to render animations. It seems there are some troubles and workarounds about CPU load using this library. There should be some rooms for improvements. I made a PoC based on this answer and it looks promising, still it requires more tests and attention; it could have side effects. Anyway, thank you :pray: for spotting this point, it have to be addressed indeed.

2 Likes

Hi @Yoad_Snapir :wave:

A fix has been released a few weeks ago thanks to your feedback, I guess it’s better now! Thank you for your patience :pray:. Feel free to reply to this topic if you feel like it does not fix the issue.

1 Like

Awesome! I will keep some tabs open and we’ll see :wink:
Thanks a lot!