Page MenuHomePhabricator

Reduce badness in viewing large files in the Diffusion web UI
ClosedPublic

Authored by epriestley on Jun 18 2015, 7:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 5:33 AM
Unknown Object (File)
Thu, Apr 25, 12:55 AM
Unknown Object (File)
Sun, Apr 21, 9:15 PM
Unknown Object (File)
Sun, Apr 21, 9:15 PM
Unknown Object (File)
Sun, Apr 21, 9:15 PM
Unknown Object (File)
Sun, Apr 21, 9:04 PM
Unknown Object (File)
Sun, Apr 21, 8:44 PM
Unknown Object (File)
Fri, Apr 12, 7:57 AM
Subscribers

Details

Summary

Fixes T8597. Second issue there is that if you look at a huge file in Diffusion (like /path/to/300MB.pdf) we pull the whole thing over Conduit upfront, then try to shove it into file storage.

Instead, pull no more than the chunk limit (normally 4MB) and don't spend more than 10s pulling data.

If we get 4MB of data and/or time out, just fail with a message in the vein of "this is a really big file".

Eventually, we could improve this:

  • We can determine the size of very large files correctly in at least some VCSes, this just takes a little more work. This would let us show the true filesize, at least.
  • We could eventually stream the data out of the VCS, but we can't stream data over Conduit right now and this is a lot of work.

This is just "stop crashing".

Test Plan

Changed limits to 0.01 seconds and 8 bytes and saw reasonable errors. Changed them back and got normal beahvior.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Reduce badness in viewing large files in the Diffusion web UI.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
  • Actually use 10s limit.
  • (This is similar to similar parameters with equivalent goals on diffusion.rawdiffquery.)
btrahan edited edge metadata.
This revision is now accepted and ready to land.Jun 18 2015, 7:55 PM
This revision was automatically updated to reflect the committed changes.