1 ------------------------------------------------------------
3 revision-id: squid3@treenet.co.nz-20160521155202-pp53utwamdhkugvg
4 parent: squid3@treenet.co.nz-20160521130144-6xtcayieij00fm5v
5 author: Alex Rousskov <rousskov@measurement-factory.com>
6 committer: Amos Jeffries <squid3@treenet.co.nz>
8 timestamp: Sun 2016-05-22 03:52:02 +1200
10 Fix icons loading speed.
12 Since trunk r14100 (Bug 3875: bad mimeLoadIconFile error handling), each
13 icon was read from disk and written to Store one character at a time. I
14 did not measure startup delays in production, but in debugging runs,
15 fixing this bug sped up icons loading from 1 minute to 4 seconds.
16 ------------------------------------------------------------
17 # Bazaar merge directive format 2 (Bazaar 0.90)
18 # revision_id: squid3@treenet.co.nz-20160521155202-pp53utwamdhkugvg
19 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
20 # testament_sha1: 79b78480d81666c15406d23837608ba9a578da4b
21 # timestamp: 2016-05-21 16:51:00 +0000
22 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
23 # base_revision_id: squid3@treenet.co.nz-20160521130144-\
27 === modified file 'src/mime.cc'
28 --- src/mime.cc 2016-01-01 00:14:27 +0000
29 +++ src/mime.cc 2016-05-21 15:52:02 +0000
31 /* read the file into the buffer and append it to store */
33 char *buf = (char *)memAllocate(MEM_4K_BUF);
34 - while ((n = FD_READ_METHOD(fd, buf, sizeof(*buf))) > 0)
35 + while ((n = FD_READ_METHOD(fd, buf, 4096)) > 0)