changeset 1512:0a1266bde95b

dropped read_buffer options - they don't have any significant effect
author nadvornik
date Sat, 04 Apr 2009 21:53:12 +0000
parents 73cecf473802
children c9ed5a43c576
files src/image-load.c src/main.h src/options.c src/options.h src/preferences.c src/rcfile.c
diffstat 6 files changed, 5 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/src/image-load.c	Sat Apr 04 21:14:34 2009 +0000
+++ b/src/image-load.c	Sat Apr 04 21:53:12 2009 +0000
@@ -22,6 +22,9 @@
 #include <fcntl.h>
 #include <sys/mman.h>
 
+#define IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT 	4096
+#define IMAGE_LOADER_IDLE_READ_LOOP_COUNT_DEFAULT 	1
+
 
 /**************************************************************************************/
 /* image loader class */
@@ -79,8 +82,8 @@
 
 	il->idle_done_id = -1;
 
-	il->idle_read_loop_count = options->image.idle_read_loop_count;
-	il->read_buffer_size = options->image.read_buffer_size;
+	il->idle_read_loop_count = IMAGE_LOADER_IDLE_READ_LOOP_COUNT_DEFAULT;
+	il->read_buffer_size = IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT;
 	il->mapped_file = NULL;
 
 	il->requested_width = 0;
--- a/src/main.h	Sat Apr 04 21:14:34 2009 +0000
+++ b/src/main.h	Sat Apr 04 21:53:12 2009 +0000
@@ -98,14 +98,6 @@
 
 #define DEFAULT_MINIMAL_WINDOW_SIZE 32
 
-#define IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT 	4096
-#define IMAGE_LOADER_READ_BUFFER_SIZE_MIN 	512
-#define IMAGE_LOADER_READ_BUFFER_SIZE_MAX 	16*1024*1024
-
-#define IMAGE_LOADER_IDLE_READ_LOOP_COUNT_DEFAULT 	1
-#define IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MIN 		1
-#define IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MAX		16
-
 #define IMAGE_MIN_WIDTH 100
 #define SIDEBAR_DEFAULT_WIDTH 250
 
--- a/src/options.c	Sat Apr 04 21:14:34 2009 +0000
+++ b/src/options.c	Sat Apr 04 21:53:12 2009 +0000
@@ -67,12 +67,10 @@
 	options->image.enable_read_ahead = TRUE;
 	options->image.exif_rotate_enable = TRUE;
 	options->image.fit_window_to_image = FALSE;
-	options->image.idle_read_loop_count = IMAGE_LOADER_IDLE_READ_LOOP_COUNT_DEFAULT;
 	options->image.limit_autofit_size = FALSE;
 	options->image.limit_window_size = TRUE;
 	options->image.max_autofit_size = 100;
 	options->image.max_window_size = 90;
-	options->image.read_buffer_size = IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT;
 	options->image.scroll_reset_method = SCROLL_RESET_NOCHANGE;
 	options->image.tile_cache_max = 10;
 	options->image.image_cache_max = 128; /* 4 x 10MPix */
--- a/src/options.h	Sat Apr 04 21:14:34 2009 +0000
+++ b/src/options.h	Sat Apr 04 21:53:12 2009 +0000
@@ -71,9 +71,6 @@
 
 		gint use_custom_border_color;
 		GdkColor border_color;
-
-		gint read_buffer_size; /* bytes to read from file per read() */
-		gint idle_read_loop_count; /* the number of bytes to read per idle call (define x image.read_buffer_size) */
 	} image;
 
 	/* thumbnails */
--- a/src/preferences.c	Sat Apr 04 21:14:34 2009 +0000
+++ b/src/preferences.c	Sat Apr 04 21:53:12 2009 +0000
@@ -282,9 +282,6 @@
 	options->image.tile_cache_max = c_options->image.tile_cache_max;
 	options->image.image_cache_max = c_options->image.image_cache_max;
 
-	options->image.read_buffer_size = c_options->image.read_buffer_size;
-	options->image.idle_read_loop_count = c_options->image.idle_read_loop_count;
-
 	options->image.zoom_quality = c_options->image.zoom_quality;
 
 	options->image.zoom_increment = c_options->image.zoom_increment;
@@ -964,17 +961,6 @@
 
 	pref_spin_new_int(group, _("Decoded image cache size (Mb):"), NULL,
 			  0, 1024, 1, options->image.image_cache_max, &c_options->image.image_cache_max);
-
-	pref_spin_new_int(group, _("Image read buffer size (bytes):"), NULL,
-			  IMAGE_LOADER_READ_BUFFER_SIZE_MIN, IMAGE_LOADER_READ_BUFFER_SIZE_MAX, 512,
-			  options->image.read_buffer_size, &c_options->image.read_buffer_size);
-
-	pref_spin_new_int(group, _("Image idle loop read count:"), NULL,
-			  IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MIN, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MAX, 1,
-			  options->image.idle_read_loop_count, &c_options->image.idle_read_loop_count);
-
-
-
 }
 
 /* image tab */
--- a/src/rcfile.c	Sat Apr 04 21:14:34 2009 +0000
+++ b/src/rcfile.c	Sat Apr 04 21:53:12 2009 +0000
@@ -331,8 +331,6 @@
 	WRITE_NL(); WRITE_BOOL(*options, image.exif_rotate_enable);
 	WRITE_NL(); WRITE_BOOL(*options, image.use_custom_border_color);
 	WRITE_NL(); WRITE_COLOR(*options, image.border_color);
-	WRITE_NL(); WRITE_INT(*options, image.read_buffer_size);
-	WRITE_NL(); WRITE_INT(*options, image.idle_read_loop_count);
 
 //	WRITE_SUBTITLE("Thumbnails Options");
 
@@ -616,9 +614,6 @@
 		if (READ_BOOL(*options, image.exif_rotate_enable)) continue;
 		if (READ_BOOL(*options, image.use_custom_border_color)) continue;
 		if (READ_COLOR(*options, image.border_color)) continue;
-		if (READ_INT_CLAMP(*options, image.read_buffer_size, IMAGE_LOADER_READ_BUFFER_SIZE_MIN, IMAGE_LOADER_READ_BUFFER_SIZE_MAX)) continue;
-		if (READ_INT_CLAMP(*options, image.idle_read_loop_count, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MIN, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MAX)) continue;
-
 
 		/* thumbnails options */
 		if (READ_INT_CLAMP(*options, thumbnails.max_width, 16, 512)) continue;