diff options
author | jbj <devnull@localhost> | 2001-12-06 18:34:49 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-12-06 18:34:49 +0000 |
commit | 5a0508d51fcf84412a8f6a88a09d6dd63a16e47e (patch) | |
tree | cf3782de354fb3b37295f75f465c7574110fdb52 /lib/fsm.c | |
parent | d7e49147a28f795312b330cbfe68e60798212a93 (diff) | |
download | librpm-tizen-5a0508d51fcf84412a8f6a88a09d6dd63a16e47e.tar.gz librpm-tizen-5a0508d51fcf84412a8f6a88a09d6dd63a16e47e.tar.bz2 librpm-tizen-5a0508d51fcf84412a8f6a88a09d6dd63a16e47e.zip |
- 3 madvise calls and a 16Mb mmapped buffer == ~5% install speedup. Wow.
- use db-4.0.14 final internally.
CVS patchset: 5215
CVS date: 2001/12/06 18:34:49
Diffstat (limited to 'lib/fsm.c')
-rw-r--r-- | lib/fsm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -768,6 +768,7 @@ static int writeFile(/*@special@*/ FSM_t fsm, int writeData) size_t pos = fdGetCpioPos(fsm->cfd); char * symbuf = NULL; int left; + int xx; int rc; st->st_size = (writeData ? ost->st_size : 0); @@ -824,6 +825,7 @@ static int writeFile(/*@special@*/ FSM_t fsm, int writeData) rdbuf = fsm->rdbuf; fsm->rdbuf = (char *) mapped; fsm->rdlen = nmapped = st->st_size; + xx = madvise(mapped, nmapped, MADV_DONTNEED); } #endif @@ -850,7 +852,8 @@ static int writeFile(/*@special@*/ FSM_t fsm, int writeData) #if HAVE_MMAP if (mapped != (void *)-1) { - /*@-noeffect@*/ (void) munmap(mapped, nmapped) /*@=noeffect@*/; + xx = msync(mapped, nmapped, MS_ASYNC); + /*@-noeffect@*/ xx = munmap(mapped, nmapped) /*@=noeffect@*/; fsm->rdbuf = rdbuf; } #endif |