use generate_slices to save RAM during import_items