servo: Merge #17169 - Read 32kb from the network at a time (from servo:jdm-patch-2); r=SimonSapin
authorJosh Matthews <josh@joshmatthews.net>
Mon, 05 Jun 2017 18:18:30 -0700
changeset 412921 46b6257d29c1f898540ce9453bfb791c50b738b1
parent 412920 ff48915ee1d850708c528d310a2598f470b7bf02
child 412922 b4002383a249f859a4fbb1c7f68bd763f526e731
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersSimonSapin
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #17169 - Read 32kb from the network at a time (from servo:jdm-patch-2); r=SimonSapin Now that https://github.com/servo/servo/pull/16989 has merged, this might actually work. Source-Repo: https://github.com/servo/servo Source-Revision: 6fe0e30c169b54eb711ca1ee2dc1cdbf0ef83e82
servo/components/net/http_loader.rs
--- a/servo/components/net/http_loader.rs
+++ b/servo/components/net/http_loader.rs
@@ -48,17 +48,17 @@ use std::sync::RwLock;
 use std::sync::mpsc::{channel, Sender};
 use std::thread;
 use time;
 use time::Tm;
 use unicase::UniCase;
 use uuid;
 
 fn read_block<R: Read>(reader: &mut R) -> Result<Data, ()> {
-    let mut buf = vec![0; 1024];
+    let mut buf = vec![0; 32768];
 
     match reader.read(&mut buf) {
         Ok(len) if len > 0 => {
             buf.truncate(len);
             Ok(Data::Payload(buf))
         }
         Ok(_) => Ok(Data::Done),
         Err(_) => Err(()),