I’ve stayed at all my jobs for too long (6+ years) and regretted it every time. I have been promoted but the pace is glacial. Upon reflection the right time to leave was always 2-3 years earlier, usually right after a promotion rather than stick around for the next. I will say that first ~4 years was always worth the investment, after that, especially when you hit your RSU cliff (if you have one), it’s time to go.