From: Tim Kientzle Date: Sun, 21 Mar 2010 23:52:06 +0000 (-0400) Subject: Add a TODO comment outlining a possible future optimization. X-Git-Tag: v3.0.0a~1142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d899ab08025a6e6e69958fabf48d92689c0a276;p=thirdparty%2Flibarchive.git Add a TODO comment outlining a possible future optimization. SVN-Revision: 2050 --- diff --git a/libarchive/archive_read_open_filename.c b/libarchive/archive_read_open_filename.c index bed5e3318..a099da0a2 100644 --- a/libarchive/archive_read_open_filename.c +++ b/libarchive/archive_read_open_filename.c @@ -267,6 +267,14 @@ file_read(struct archive *a, void *client_data, const void **buff) * impact disk throughput. (Of course, the performance impact should * be carefully tested; extra code complexity is only worthwhile if * it does provide measurable improvement.) + * + * TODO: Be lazy about the actual seek. There are a few pathological + * cases where libarchive makes a bunch of seek requests in a row + * without any intervening reads. This isn't a huge performance + * problem, since the kernel handles seeks lazily already, but + * it would be very slightly faster if we simply remembered the + * seek request here and then actually performed the seek at the + * top of the read callback above. */ static off_t file_skip_lseek(struct archive *a, void *client_data, off_t request)