RSS/Atom feed Twitter
Site is read-only, email is disabled

new tile-swap.c

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

6 of 6 messages available
Toggle history

Please log in to manage your subscriptions.

new tile-swap.c Tim Newsome 12 Sep 23:47
  new tile-swap.c Sven Neumann 13 Sep 16:56
   new tile-swap.c Tim Newsome 13 Sep 17:54
    new tile-swap.c Sven Neumann 13 Sep 18:22
     new tile-swap.c Tim Newsome 13 Sep 20:14
new tile-swap.c Kelly Martin 13 Sep 19:48
Tim Newsome
2002-09-12 23:47:06 UTC (over 21 years ago)

new tile-swap.c

A while back I wanted to open this huge satellite image I downloaded from NASA, and the Gimp required more than 2Gb of swap space. It didn't work, so I wrote a new tile-swap.c which makes additional swap files once the current one hits 1Gb. Also, the following diff needs to be aplpied:

--- gimp-1.3.7/app/base/tile-private.h 2001-12-03 05:44:50.000000000 -0800 +++ gimp-1.3.7-tiles/app/base/tile-private.h 2002-08-03 18:59:37.000000000 -0 700
@@ -76,7 +76,7 @@
* for swapping. swap_num 1 is always the global * swap file.
*/
- off_t swap_offset; /* the offset within the swap file of the tile data. + guint64 swap_offset;/* the offset within the swap file of the tile data. * if the tile data is in memory this will be set to -1. */
TileLink *tlink;

This is against 1.3.7, but should trivially apply to 1.3.8 since it's just the wholesale swapping out of a file.

Please direct any comments, flames, etc, my way.

Tim

Sven Neumann
2002-09-13 16:56:57 UTC (over 21 years ago)

new tile-swap.c

Hi,

Tim Newsome writes:

A while back I wanted to open this huge satellite image I downloaded from NASA, and the Gimp required more than 2Gb of swap space. It didn't work, so I wrote a new tile-swap.c which makes additional swap files once the current one hits 1Gb.

this shouldn't be necessary since the current code should handle large swap files (see http://bugzilla.gnome.org/show_bug.cgi?id=74478).

Also, the following diff
needs to be aplpied:

--- gimp-1.3.7/app/base/tile-private.h 2001-12-03 05:44:50.000000000 -0800 +++ gimp-1.3.7-tiles/app/base/tile-private.h 2002-08-03 18:59:37.000000000 -0 700
@@ -76,7 +76,7 @@
* for swapping. swap_num 1 is always the global * swap file.
*/
- off_t swap_offset; /* the offset within the swap file of the tile data. + guint64 swap_offset;/* the offset within the swap file of the tile data. * if the tile data is in memory this will be set to -1. */
TileLink *tlink;

IMO off_t is the correct type here. Since we use AC_SYS_LARGEFILE, off_t should be 64 bits long if your OS supports such large files. guint64 is definitely wrong since an offset should always be a signed value.

Salut, Sven

Tim Newsome
2002-09-13 17:54:07 UTC (over 21 years ago)

new tile-swap.c

On Fri, Sep 13, 2002 at 04:56:57PM +0200, Sven Neumann wrote:

A while back I wanted to open this huge satellite image I downloaded from NASA, and the Gimp required more than 2Gb of swap space. It didn't work, so I wrote a new tile-swap.c which makes additional swap files once the current one hits 1Gb.

this shouldn't be necessary since the current code should handle large swap files (see http://bugzilla.gnome.org/show_bug.cgi?id=74478).

But that requires file system support for >2Gb files. My patch doesn't.

Tim

Sven Neumann
2002-09-13 18:22:15 UTC (over 21 years ago)

new tile-swap.c

Hi,

Tim Newsome writes:

On Fri, Sep 13, 2002 at 04:56:57PM +0200, Sven Neumann wrote:

A while back I wanted to open this huge satellite image I downloaded from NASA, and the Gimp required more than 2Gb of swap space. It didn't work, so I wrote a new tile-swap.c which makes additional swap files once the current one hits 1Gb.

this shouldn't be necessary since the current code should handle large swap files (see http://bugzilla.gnome.org/show_bug.cgi?id=74478).

But that requires file system support for >2Gb files. My patch doesn't.

is that a real-world problem? I mean are people really working with large images and use filesystems that don't support files >2GB ? I wouldn't like to do significant changes to the tile swap code without a really good reason.

Salut, Sven

Kelly Martin
2002-09-13 19:48:28 UTC (over 21 years ago)

new tile-swap.c

I rather like Tim's idea, since it works even on systems where large file support is not available. If his approach works, I see no reason not to use it.

Kelly

----- Original Message ----- From: "Tim Newsome"
To:
Sent: Friday, September 13, 2002 10:54 AM Subject: Re: [Gimp-developer] new tile-swap.c

On Fri, Sep 13, 2002 at 04:56:57PM +0200, Sven Neumann wrote:

A while back I wanted to open this huge satellite image I downloaded from NASA, and the Gimp required more than 2Gb of swap space. It didn't work, so I wrote a new tile-swap.c which makes additional swap files once the current one hits 1Gb.

this shouldn't be necessary since the current code should handle large swap files (see http://bugzilla.gnome.org/show_bug.cgi?id=74478).

But that requires file system support for >2Gb files. My patch doesn't.

Tim --
Tim Newsome nuisance@casualhacker.net http://www.wiw.org/~drz/ And we have just one world / But we live in different ones

Tim Newsome
2002-09-13 20:14:00 UTC (over 21 years ago)

new tile-swap.c

On Fri, Sep 13, 2002 at 06:22:15PM +0200, Sven Neumann wrote:

from NASA, and the Gimp required more than 2Gb of swap space. It

this shouldn't be necessary since the current code should handle large swap files (see http://bugzilla.gnome.org/show_bug.cgi?id=74478).

But that requires file system support for >2Gb files. My patch doesn't.

is that a real-world problem? I mean are people really working with large images and use filesystems that don't support files >2GB ? I wouldn't like to do significant changes to the tile swap code without a really good reason.

Fair enough. I don't feel my code compromises anything, but I definitely understand the "if it ain't broke, don't fix it" attitude. I find it useful (and use the gimp this way) so I figured I'd offer it up for everybody else to use. Perhaps the new tile code could be a configure option? (Since it's really just a matter of wholesale replacing one file and changing a single line.)

Tim