tunarr
tunarr copied to clipboard
Improve InlineModal performance
Some things I've noticed while working here:
- The component re-renders a lot. There are a lot of potential causes here
- It seems like we "over mount"; I think this is related to 1. having to have the components in tree in order for animations to be smooth and also 2. modal 'index' doesn't necessarily match the index of the item being displayed, which complicates things. That said, the animation isn't smooth for other reasons, so perhaps we should stop rendering all of these for now until we can figure out another way
- The InlineModal overexpands and then retracts on initial open animation. I think this is related to the height estimation code, but I'm not sure.
Wonder if we're over-using useEffect in these components
We have some huge improvements in performance here on the Jellyfin branch.