Files
flipper/desktop
Michel Weststrate 9bd3d6fd7c Fix serialization performance
Summary:
Using our serialization utilities in the previous diff absolute destroyed the performance of serializing the device logs. Investigated a bit, and the root cause is that *every* object serialization would notify the UI.

This is not only pointless, since the UI won't be updated until the next tick anyway, it also is terribly expensive since React has to process and queue all these updates.

Exporting the device logs went down from **2 minutes to a few seconds** with this change. (Still a lot slower than JSON.stringify, but I think the flexibility for plugin devs is worth it).

This change does not only benefit devicelogs plugin, but all existing plugins as well, plugins like GraphQL should now export their data much quicker.

Before (practically all time of serialization is spend in React's setState):

{F366147730}

After (only a spike at the end of the idler tick):

{F366147779}

Reviewed By: priteshrnandgaonkar

Differential Revision: D26146420

fbshipit-source-id: 9bbeccf04701fd044e041956b7bb00f1e0622b63
2021-02-01 11:43:31 -08:00
..
2021-02-01 11:43:31 -08:00
2021-02-01 02:28:34 -08:00
2020-11-09 08:24:28 -08:00
2021-01-26 05:34:36 -08:00
2020-06-19 03:54:49 -07:00
2020-08-20 13:32:47 -07:00