You could try to only update and render shadows that are currently visible on the screen.
/edit: Add some buffer around the visible area, so you don't experience shadows popping up.
/edit: Add some buffer around the visible area, so you don't experience shadows popping up.