Optimizing resource loading/parsing