This PR increases the size of the downloader's buffer, so it will keep polling more blocks in the background than it otherwise would have. At the same time, this means that a single Next() call with an empty buffer would wait a long time to return (until the entire poll is finished). It was already slow with 8 instead of 100. So with this change, it will never wait for the buffer to be full, but instead return to the business logic which will have a much smaller wait. Combined, these changes should significantly reduce initial sync time.
Goal of this PR
This PR increases the size of the downloader's buffer, so it will keep polling more blocks in the background than it otherwise would have. At the same time, this means that a single
Next()
call with an empty buffer would wait a long time to return (until the entire poll is finished). It was already slow with 8 instead of 100. So with this change, it will never wait for the buffer to be full, but instead return to the business logic which will have a much smaller wait. Combined, these changes should significantly reduce initial sync time.Checklist