On a general open set of the euclidean space, we study the relation between the embedding of the homogeneous Sobolev space D 1,p 0 into L q and the summability properties of the distance function. We prove that in the superconformal case (i.e. when p is larger than the dimension) these two facts are equivalent, while in the subconformal and conformal cases (i.e. when p is less than or equal to the dimension) we construct counterexamples to this equivalence. In turn, our analysis permits to study the asymptotic behaviour of the positive solution of the Lane-Emden equation for the p−Laplacian with sub-homogeneous right-hand side, as the exponent p diverges to ∞. The case of first eigenfunctions of the p−Laplacian is included, as well. As particular cases of our analysis, we retrieve some well-known convergence results, under optimal assumptions on the open sets. We also give some new geometric estimates for generalized principal frequencies.