Move buffer population into main thread