fix a few places related to feature / example generation, also, try to cap memory usage when precomputing