major performance improvement when reading images