Page MenuHomePhabricator

Allow diff generation via ArcanistBundle to be limited to an approximate maximum byte size
ClosedPublic

Authored by epriestley on May 10 2018, 5:02 PM.
Tags
None
Referenced Files
F13169356: D19444.id.diff
Tue, May 7, 8:21 AM
Unknown Object (File)
Fri, May 3, 7:13 AM
Unknown Object (File)
Thu, Apr 25, 1:36 AM
Unknown Object (File)
Fri, Apr 19, 7:44 PM
Unknown Object (File)
Wed, Apr 17, 2:50 PM
Unknown Object (File)
Tue, Apr 16, 3:34 AM
Unknown Object (File)
Sat, Apr 13, 12:48 PM
Unknown Object (File)
Mar 28 2024, 5:44 AM
Subscribers
None

Details

Summary

Ref T13137. See PHI592. When you have a diff with 600MB of videos, we want to bail out of diff generation early (as soon as we realize what we're dealing with), not build an 800MB text diff in memory and then throw it away.

Support bailout during diff generation once we realize we're in over our heads.

This is approximate, but since the limit is fairly large (512KB by default) it isn't too important to be precise.

Test Plan

Rigged some callers to set various byte limits, generated diffs including diffs with large binaries. Got an appropriate diff or exeception depending on how low the limit was.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable