New issue 1088: Iterating over a time series is much slower in 3.x compared to 2.x
This causes a significant slowdown when running the enzo test suite under yt 3.x.
Test script (can be run under both yt-2.x and yt-3.x):
from yt.mods import *
from yt.utilities.logger import disable_stream_logging
sim = simulation('enzo_tiny_cosmology/32Mpc_32.enzo', 'Enzo', find_outputs=True)
for ds in sim:
On my laptop, under yt-3.x this runs in 6.5. In a docker container running on a VM (quickest way I had to get a yt-2.x installation), the same script runs in 864 ms.
The main slowdown seems to be the ` _add_object_class` function in the `Dataset` base class. A way around this might be to somehow cache the structure of the dataset from one iteration loop to the next or alternately figure out how to instantiate `Dataset` instances much faster.