Fuel pump check valve.
I could replaced the fuel pump for $200 but I fixed the problem by putting in the fix from BMW for about $3.50,
part # "16 14 9 068 988"
Now the engine starts on first turn, hot or cold, overnight or after
standing for a while.
The check valve in the main fuel pump was leaking allowing the fuel injector rail residual pressure to bleed off resulting in formation of a huge fuel vapor bubble in the fuel rail and back down the fuel line toward the pump.
The extra cranking time was needed by the fuel pump to recompress and
eliminate the fuel vapor bubble in the line and repressurize the fuel injector rail.
Installation can be anywhere in the fuel pressure line but next to the main pressure pump is best.
It is a two screw clamp job.