From 0d899ab08025a6e6e69958fabf48d92689c0a276 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sun, 21 Mar 2010 19:52:06 -0400 Subject: [PATCH] Add a TODO comment outlining a possible future optimization. SVN-Revision: 2050 --- libarchive/archive_read_open_filename.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- 2.47.3