comparison src/core/ngx_file.c @ 4038:30519bb5621d stable-1.0

Merge of r3966, r3967, r3968, r3969, r3970, r3971: Cache loader improvements: The cache loader performs two tasks: inserting cache objects in inactivity list and evaluating total cache size. Reading just directory is enough for this purpose. Elimination of reading cache files saves at least one disk I/O operation per file.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 29 Aug 2011 09:51:56 +0000
parents dd1570b6f237
children d620f497c50f
comparison
equal deleted inserted replaced
4037:f4dd627c657f 4038:30519bb5621d
924 924
925 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->log, 0, 925 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->log, 0,
926 "tree file \"%s\"", file.data); 926 "tree file \"%s\"", file.data);
927 927
928 ctx->size = ngx_de_size(&dir); 928 ctx->size = ngx_de_size(&dir);
929 ctx->fs_size = ngx_de_fs_size(&dir);
929 ctx->access = ngx_de_access(&dir); 930 ctx->access = ngx_de_access(&dir);
930 ctx->mtime = ngx_de_mtime(&dir); 931 ctx->mtime = ngx_de_mtime(&dir);
931 932
932 if (ctx->file_handler(ctx, &file) == NGX_ABORT) { 933 if (ctx->file_handler(ctx, &file) == NGX_ABORT) {
933 goto failed; 934 goto failed;