getFunctionLengths() is much faster