Scribusoid

Author Topic: Memory usage  (Read 4031 times)

founder

  • Full Member
  • ***
  • Posts: 113
  • Karma: 0
Memory usage
« on: January 11, 2012, 09: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.

founder

  • Full Member
  • ***
  • Posts: 113
  • Karma: 0
Re: Memory usage
« Reply #1 on: January 11, 2012, 10:23:56 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

founder

  • Full Member
  • ***
  • Posts: 113
  • Karma: 0
Re: Memory usage
« Reply #2 on: January 11, 2012, 11:33:21 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.

Nermander

  • Hero Member
  • *****
  • Posts: 1321
  • Karma: 17
Re: Memory usage
« Reply #3 on: January 11, 2012, 01: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.

founder

  • Full Member
  • ***
  • Posts: 113
  • Karma: 0
Re: Memory usage
« Reply #4 on: January 11, 2012, 03:10:06 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

Nermander

  • Hero Member
  • *****
  • Posts: 1321
  • Karma: 17
Re: Memory usage
« Reply #5 on: January 11, 2012, 08:33:17 pm »

founder

  • Full Member
  • ***
  • Posts: 113
  • Karma: 0
Re: Memory usage
« Reply #6 on: January 11, 2012, 09:20:08 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.

utnik

  • Hero Member
  • *****
  • Posts: 1326
  • Karma: 14
Re: Memory usage
« Reply #7 on: January 11, 2012, 09: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

founder

  • Full Member
  • ***
  • Posts: 113
  • Karma: 0
Re: Memory usage
« Reply #8 on: January 11, 2012, 09:50:46 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

founder

  • Full Member
  • ***
  • Posts: 113
  • Karma: 0
Made a work around
« Reply #9 on: January 11, 2012, 10: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