Does nucleation depend on the rate of change in pressure in a carbonated liquid?

Carbonated beer flowing from a keg through a short length of tubing results in large quantities of foam. Unintuitively (at least to me), increasing the length of tubing results in a less frothy drink.

Why?

Internet brewing forums suggest that foam formation can be caused by a rapid drop in pressure when the beer leaves the keg. They state that the a more gradual pressure drop due to frictional effects of the beer in a longer pipe solves the froth problem.

I understand that classical nucleation theory can show that the free energy at a nucleation site is $\Delta G = \frac{4}{3}\pi r^3 \Delta g + 4 \pi r^2 \sigma$, where $r$ is the radius of the bubble. Because $\Delta g<0$ but $\sigma>0$ the $r^2$ and $r^3$ terms fight each other and create a nucleation energy barrier.

My understanding is that the critical radius $r^*$ associated with this energy barrier is fairly large for typical carbonated beers and so homogeneous nucleation is extremely unlikely to occur in a pint glass. However heterogeneous nucleation can occur where the glass is sufficiently rough, and I believe his is because the interfacial energy is lower and hence the energy barrier is easier to overcome.

If the brewers are correct when they say the rate of change of pressure is significant, what is the physical explanation for this? Can a rapid change in pressure somehow help overcome the energy barrier like a scratch on the glass, or is there an alternative explanation?

It's not the rapid decrease in pressure, but the associated turbulence. There's a pinch point in the valve that the beer squeezes past, and in the process undergoes lots of turbulence. Like shaking a soda can, this causes the $CO_2$ to come out of solution as froth.
Edit: Another aspect does involve pressure: with the additional drag of the hose, the pressure immediately after the pinch point stays higher, keeping the $CO_2$ in solution.