Repository navigation
Give up and assume diff is too large - #4052
iAmWillShepherd wants to merge 5 commits into
Conversation
|
✅ tested for UI and functionality |
| * buffer before _assuming_ the current buffer being read is `MaxDiffBufferSize`. | ||
| * This is done so that the UI isn't waiting for the entire buffer to be read. | ||
| */ | ||
| const MaxBytesToRead = MaxDiffBufferSize / 8 //~32MB |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| MaxBytesToRead | ||
| ) | ||
| if (isBufferTooLarge(output)) { | ||
| if (!didReadAllBytes || isBufferTooLarge(output)) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| MaxBytesToRead | ||
| ) | ||
| if (isBufferTooLarge(output)) { | ||
| if (!didReadAllBytes || isBufferTooLarge(output)) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * buffer before _assuming_ the current buffer being read is `MaxDiffBufferSize`. | ||
| * This is done so that the UI isn't waiting for the entire buffer to be read. | ||
| */ | ||
| const MaxBytesToRead = MaxDiffBufferSize / 8 //~32MB |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
So, it looks like we won't need this PR anymore since we limit diff sizes to 70MBs due to larger diffs not rendering completely (see comment). Before, the max diff size was around 256MB and waiting up to 10 seconds just for the UI to update and show the diff was too large to render was unacceptable; however, at 70MB, the max time to wait is around 1-2 seconds max. Going to close this out since the delay is no longer an issue. |
Please make sure this is merged before PR #4050, so that I can fix merge conflicts in that branch
I noticed this issue while working on PR #3980, which is now closed to make code review easier. Shoutout to @shiftkey for letting me know that
spawncan be given the maximum number of bytes to read.Notice how long it takes the UI to catch up and let me know the diff can't be displayed. This changes means that we give up sooner and assume a diff is too large so the UX can be a bit better.
Before
After