Only generate data when needed