A bit more efficient resource enumeration.