Scribus Forums

Scribus => General Discussion => Topic started by: founder on January 11, 2012, 08:31:43 AM

Title: Memory usage
Post by: founder on January 11, 2012, 08:31:43 AM
52 Pictures with 31 MB on disk
3 Scribus files with 3 MB on disk

That's the current status of my book project.
English version 150 pages
German version 150 pages
Covers in 4 languages 4 pages

But why do they use up 840 MB memory?

As I wrote 1992 my first book, I had to divide it into 30 files,
because I had a computer with only 8 MB memory.

Now I have 512 times more, the usual 4 GB,
but with all the other tasks runing,
I think memory usage should be optimized.

Maybe all graphics uncompressed ready to use in memory?

I think memory usage should be optimized,
that my current task shrinks to 200 MB or 300 MB.

I think my book will have about 400 pages,
at the current memory usage, I fear big problems
to hold English and German version at the same time open.
Title: Re: Memory usage
Post by: founder on January 11, 2012, 09:23:56 AM
Quote from: founder on January 11, 2012, 08:31:43 AM
52 Pictures with 31 MB on disk
3 Scribus files with 3 MB on disk

That's the current status of my book project.
English version 150 pages
German version 150 pages
Covers in 4 languages 4 pages

But why do they use up 840 MB memory?

As I wrote 1992 my first book, I had to divide it into 30 files,
because I had a computer with only 8 MB memory.

Now I have 512 times more, the usual 4 GB,
but with all the other tasks runing,
I think memory usage should be optimized.

Maybe all graphics uncompressed ready to use in memory?

I think memory usage should be optimized,
that my current task shrinks to 200 MB or 300 MB.

I think my book will have about 400 pages,
at the current memory usage, I fear big problems
to hold English and German version at the same time open.

Just closed the cover of the book.
There are 3 pictures with 3000 x 4243 resolution
and some smaller pictures.

When I calculate 3000 x 4243 * 3 bytes * 3 pictures and the smaller pictures
are about the same 140 MB as the memory usage reduced after closing the file.

So it seems that all pictures are hold in memory complete uncompressed.

I rendered the picture in such a high resolution,
because I think I could need this for a poster version of the book cover.

Proposal:

Hold picture files in memory only ready for 200% zoom or less.
Maybe a new preference setting in what dpi, pictures should be hold in memory.

A dialog like this is already in the PDF export. DPI for PDF export.

Check same picture used several times, hold it only one time in memory.
This is a special case, because I prefer to open English and German version of my book at the same time.
So natural, all pictures are used 2 times, one time in the English version, second time in the German version


Work around if next version does not have this feature:

My only chance to escape the memory usage problem would be to simulate
my proposal by own software.

This means I would use a software to generate 2 versions of all my pictures.
The original version in full resolution and a second version with a smaller resolution.

Depending on what sort of work I do, one of this version copied into the project folder.
For general editing work, not the originals from my camera with 2048 x 1536,
only a reduced version with maybe 1024 x 768 reducing the memory usage by 75%

Only at the final production, I would close all other programs and use the full resolution pictures,
for editing the low resolution
Title: Re: Memory usage
Post by: founder on January 11, 2012, 10:33:21 AM
Quote from: founder on January 11, 2012, 09:23:56 AM
Quote from: founder on January 11, 2012, 08:31:43 AM
52 Pictures with 31 MB on disk
3 Scribus files with 3 MB on disk

But why do they use up 840 MB memory?

Work around if next version does not have this feature:

My only chance to escape the memory usage problem would be to simulate
my proposal by own software.

This means I would use a software to generate 2 versions of all my pictures.
The original version in full resolution and a second version with a smaller resolution.

Depending on what sort of work I do, one of this version copied into the project folder.
For general editing work, not the originals from my camera with 2048 x 1536,
only a reduced version with maybe 1024 x 768 reducing the memory usage by 75%

Only at the final production, I would close all other programs and use the full resolution pictures,
for editing the low resolution

Just tested my work around:

Create new document
Image 200mm x 150mm
Get image -> test.png 2048x1536 resolution
Adjust image to frame
save document
close document

Now I exchanged test.png against 600x450
open document
The exchanged test.png shows up in the image frame like
expected.

But I would prefer no work around, that memory optimization is built into the next release
The current situation is really a problem at a 4 GB computer.

For luck, I limited the resolution of my camera since 2001 to 3 Megapixel.
3 Megapixel are enough for the cover page of a DIN-A4 sized magazine.
40 pictures with 8 instead of 3 Megapixel would use up
5 Mega Pixel more * 3 Bytes * 40 pictures = 600 MB

Or one of this modern 15 Mega Pixel cameras
12 Mega Pixel more * 3 Bytes * 40 pictures = 1440 MB

Beside Scribus, I have to have
White Smoke - english style
Babylon - dictionary
Thunderbird - email
Thumbs plus - Photo database
POVRAY - raytraceing
and several other small programms.
Title: Re: Memory usage
Post by: Nermander on January 11, 2012, 12:52:37 PM
I can agree that it is strange if Scribus really holds the uncompressed images in memory, because Scribus have a setting to limit the preview resolution of images.  So I don't think the images are the problem.
Title: Re: Memory usage
Post by: founder on January 11, 2012, 02:10:06 PM
Quote from: Nermander on January 11, 2012, 12:52:37 PM
I can agree that it is strange if Scribus really holds the uncompressed images in memory, because Scribus have a setting to limit the preview resolution of images.  So I don't think the images are the problem.

Where is this seting?

I already searched for something to reduce memory usage, but did not find it.

The memory usage correlates good with image pixel width * pixel height * 3
Title: Re: Memory usage
Post by: Nermander on January 11, 2012, 07:33:17 PM
This article might help
http://wiki.scribus.net/canvas/FAQ:_Adding_Content#Images
Title: Re: Memory usage
Post by: founder on January 11, 2012, 08:20:08 PM
Quote from: Nermander on January 11, 2012, 07:33:17 PM
This article might help
http://wiki.scribus.net/canvas/FAQ:_Adding_Content#Images

Just tested this document setting to the lowest, saved the document.

Load again, even restart Scibus, checked, the seting was saved,
but the memory usage of one book version was 450 MB.

So I would quess:

The switch is degenerated, does not work anymore,
I think the higest seting is used, regardles what is set.
Title: Re: Memory usage
Post by: utnik on January 11, 2012, 08:43:01 PM
hi founder

did you change the resolution in: 'file' → 'document setup' → 'tools' → 'image frame properties' or in the setting for the whole application (menu: 'scribus')?
only the setting under 'file' → 'document setup' will affect the existing file – the other one is for new documents only...

utnik
Title: Re: Memory usage
Post by: founder on January 11, 2012, 08:50:46 PM
Quote from: utnik on January 11, 2012, 08:43:01 PM
hi founder

did you change the resolution in: 'file' → 'document setup' → 'tools' → 'image frame properties' or in the setting for the whole application (menu: 'scribus')?
only the setting under 'file' → 'document setup' will affect the existing file – the other one is for new documents only...

utnik

Just checked it agin. Set to low resolution
Title: Made a work around
Post by: founder on January 11, 2012, 09:47:08 PM
Just finished a work around to handle the situation.

I created folder

Photos-for-Print
Photos-for-Edit

From one of the folders, the photos are copied into the folder with my book.

The Photos-for Edit are created by ImageMagick with -geometry 800x800

The memory usage:

Scibus no file loaded 40 MB
Scribus file loaded, pictures hidden in an other folder 100 MB
Scribus file loaded with the pictures in low resolution 160 MB
Scribus file loaded with the pictures in high resolution 450 MB

It seems at this is a degeneration from my snap shot from a later RC6
(RC 6 had a degeneration at rotating text)
and V 1.4.0