Split up rendering into chunks to avoid locking the UI thread