]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Add a TODO comment outlining a possible future optimization.
authorTim Kientzle <kientzle@gmail.com>
Sun, 21 Mar 2010 23:52:06 +0000 (19:52 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sun, 21 Mar 2010 23:52:06 +0000 (19:52 -0400)
SVN-Revision: 2050

libarchive/archive_read_open_filename.c

index bed5e3318d8654d9a8276dbadb03ca12143d15a0..a099da0a2c8ae7d21954f74f986b40c9ce69e1f7 100644 (file)
@@ -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)