When editing the same resource two times in a row, store is getting crazy
No idea for now about the source of the issue, but it looks like when you edit two times in a row the same resource, then the whole tab is freezing and a lot of client side memory allocations are happenning for nothing.
Bonus, we are not able to load the edit solid-form properly the second time. See screenshot:
I also attached a performance capture of the second edition:
resource-edit-perf-profile.json
Ping @matthieu we should debug that together to understand what's happenning.
Memory allocation of the tab itself is also getting crazy:
│ ├──848.52 MB (39.77%) -- top(https://coopedia.coompanion.se/en/contributor-dashboard/contributor-resource-edit/@https%3A//api.coopedia.coompanion.se/resources/29/@, id=3185)
│ │ ├──753.91 MB (35.33%) -- active
│ │ │ ├──753.32 MB (35.30%) -- window(https://coopedia.coompanion.se/en/contributor-dashboard/contributor-resource-edit/@https%3A//api.coopedia.coompanion.se/resources/29/@)
│ │ │ │ ├──453.24 MB (21.24%) -- js-realm(https://coopedia.coompanion.se/en/)
│ │ │ │ │ ├──451.67 MB (21.17%) -- classes
│ │ │ │ │ │ ├──184.07 MB (08.63%) -- class(Object)/objects
│ │ │ │ │ │ │ ├──135.54 MB (06.35%) ── gc-heap
│ │ │ │ │ │ │ └───48.53 MB (02.27%) -- malloc-heap
│ │ │ │ │ │ │ ├──48.52 MB (02.27%) ── slots
│ │ │ │ │ │ │ └───0.02 MB (00.00%) ── elements/normal
│ │ │ │ │ │ ├───87.58 MB (04.10%) -- class(Function)/objects
│ │ │ │ │ │ │ ├──58.60 MB (02.75%) ── gc-heap
│ │ │ │ │ │ │ └──28.97 MB (01.36%) ── malloc-heap/slots
│ │ │ │ │ │ ├───65.46 MB (03.07%) ++ (25 tiny)
│ │ │ │ │ │ ├───61.10 MB (02.86%) -- class(Array)/objects
│ │ │ │ │ │ │ ├──56.25 MB (02.64%) ── gc-heap
│ │ │ │ │ │ │ └───4.85 MB (00.23%) ++ malloc-heap
│ │ │ │ │ │ └───53.46 MB (02.51%) -- class(Call)/objects
│ │ │ │ │ │ ├──53.45 MB (02.50%) ── gc-heap
│ │ │ │ │ │ └───0.01 MB (00.00%) ── malloc-heap/slots
│ │ │ │ │ └────1.57 MB (00.07%) ++ (7 tiny)
│ │ │ │ ├──296.14 MB (13.88%) -- dom
│ │ │ │ │ ├──288.60 MB (13.53%) ── orphan-nodes
│ │ │ │ │ └────7.54 MB (00.35%) ++ (6 tiny)
│ │ │ │ └────3.94 MB (00.18%) ++ (2 tiny)
│ │ │ └────0.60 MB (00.03%) ++ (2 tiny)
│ │ └───94.61 MB (04.43%) -- js-zone(0x7f295a407000)
│ │ ├──28.47 MB (01.33%) ── unused-gc-things
│ │ ├──23.35 MB (01.09%) ++ shapes
│ │ ├──23.09 MB (01.08%) ++ strings
│ │ └──19.70 MB (00.92%) ++ (13 tiny)