Improve performance by moving _build_osv in init