  We investigate the relationship between the compactness of embeddings of
Sobolev spaces built upon rearrangement-invariant spaces into
rearrangement-invariant spaces endowed with $d$-Ahlfors measures under certain
restriction on the speed of its decay on balls. We show that the gateway to
compactness of such embeddings, while formally describable by means of optimal
embeddings and almost-compact embeddings, is quite elusive. It is known that
such a Sobolev embedding is not compact when its target space has the optimal
fundamental function. We show that, quite surprisingly, such a target space can
actually be "fundamentally enlarged", and yet the resulting embedding remains
noncompact. In order to do that, we develop two different approaches. One is
based on enlarging the optimal target space itself, and the other is based on
enlarging the Marcinkiewicz space corresponding to the optimal fundamental
function.
