The length of your chain you need is about the big cog on your cassette. You size it by wrapping big + big and adding two lengths.
However having an excessively long chain would cause problems on the small cogs of your cassette, and cassettes pretty much have the same small cogs for this purpose.
So in a way the two things aren't actually related at all.
>>2034030This is basically right but we're talking about efficiencies, it's like having too long cables. It's not a problem problem it's just not perfect, however, it can be a contributing factor in problems. Especially if your derailer has worn out springs or stiff pivots. If you do end up with fucky shifting or dropped chains then it matters otherwise it doesn't matter.
You might exceed your derailer capacity limit (which is your chain length) and so your derailer cage isn't long enough to wrap the small + small gear, so the chain drags on itself. That isn't a problem though because it's not a useful gear. My grassel bike with 53/39/24 rings, 11-36 cassette and a medium cage derailer does this and i don't care.
If your chain is too short on the other hand, then it can bend/rip your derailer off in the large+large combo and write off your frame.