dropped read_buffer options - they don't have any significant effect
authorVladimir Nadvornik <nadvornik@suse.cz>
Sat, 4 Apr 2009 21:53:12 +0000 (21:53 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Sat, 4 Apr 2009 21:53:12 +0000 (21:53 +0000)
src/image-load.c
src/main.h
src/options.c
src/options.h
src/preferences.c
src/rcfile.c

index ff92bb3..f29e275 100644 (file)
@@ -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 @@ static void image_loader_init(GTypeInstance *instance, gpointer g_class)
 
        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;
index bb53852..e05ac7c 100644 (file)
 
 #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
 
index 92654ae..4186b42 100644 (file)
@@ -67,12 +67,10 @@ ConfOptions *init_options(ConfOptions *options)
        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 */
index 168ae12..8f1fb0c 100644 (file)
@@ -71,9 +71,6 @@ struct _ConfOptions
 
                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 */
index 99ecdb5..0754297 100644 (file)
@@ -282,9 +282,6 @@ static void config_window_apply(void)
        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 @@ static void config_tab_general(GtkWidget *notebook)
 
        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 */
index ce95a70..5ce2fae 100644 (file)
@@ -331,8 +331,6 @@ static void write_global_attributes(GString *outstr, gint indent)
        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 @@ static gboolean load_global_params(const gchar **attribute_names, const gchar **
                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;