View Issue Details

IDProjectCategoryView StatusLast Update
0009826ScribusColor Managementpublic2016-12-08 22:04
Reportercezaryece Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version1.4.0svn 
Target Version1.5.4 
Summary0009826: [BUG] images load twice during opening SLA file when CMS enabled
DescriptionDuring loading doc from SLA file ScImgDataLoader_JPEG::loadPicture is called twice per each image.

First call is from scribus134format.cpp line 2205
  doc->loadPict(currItem->Pfile, currItem, false);

ScribusMainWindow::loadDoc ->
  FileLoader::LoadFile ->
    FileLoader::loadFile ->
      Scribus134Format::loadFile ->
        Scribus134Format::PasteItem ->
          ScribusDoc::loadPict ->
            PageItem::loadImage ->
              ScImage::LoadPicture ->
                ScImgDataLoader_JPEG::loadPicture
        

Second one is from line 4116 of scribus.cpp
  doc->RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK);

ScribusMainWindow::loadDoc ->
  ScribusDoc::RecalcPictures ->
     ScribusDoc::loadPict ->
       PageItem::loadImage ->
         ScImage::LoadPicture ->
           ScImgDataLoader_JPEG::loadPicture



It make document loading time much longer depending on images size and number (maybe even twice longer).

I wonder if CMS profiles can be calculated before loading image (and avoid second load) or only read image header and embedded profiles in first call?
TagsNo tags attached.
PatchNo

Relationships

has duplicate 0010866 closedjghali While opening a sla file made using and old scribus version image frames are loaded twice. 
child of 0002438 acknowledged Metabug: Cases of extreme memory use 

Activities

cezaryece

2011-03-14 08:16

updater   ~0025810

I wonder if ScribusDoc::RecalcPictures routine is indeed needed during loading SLA doc.
In ScImage::LoadPicture (which is called in both cases) there is a section started with
2035 if (cmSettings.useColorManagement() && useProf)
and to line 2417 (almost 400 lines of code!) all is about colors and profiles settings.

Maybe calling RecalcPictures during document loading is doing once again the done job?

cezaryece

2011-03-14 09:59

updater   ~0025811

See that while importing image into frame file is loaded once.
Trying simply commenting out RecalcPictures from ScribusMainWindow::loadDoc I dont see any wrong effects, but I am not using files with embedded profiles, what may does matter.

Kunda

2015-05-16 01:14

updater   ~0035148

Adding to 1.5.1 not necessarily with the hope that it will get fixed but that it will generate conversation and see if this may actually contribute to speeding up bottlenecks in scribus performance.

Issue History

Date Modified Username Field Change
2011-03-10 09:19 cezaryece New Issue
2011-03-10 10:05 cbradney Summary [BUG] images are load twice during opening SLA file => [BUG] images are load twice during opening SLA file when CMS enabled
2011-03-10 14:38 plinnell Assigned To => jghali
2011-03-10 14:38 plinnell Status new => assigned
2011-03-14 08:16 cezaryece Note Added: 0025810
2011-03-14 09:59 cezaryece Note Added: 0025811
2012-07-11 20:01 jghali Relationship added has duplicate 0010866
2014-09-18 12:37 Kunda Relationship added child of 0002438
2014-09-18 12:38 Kunda Summary [BUG] images are load twice during opening SLA file when CMS enabled => [BUG] images load twice during opening SLA file when CMS enabled
2015-05-16 01:14 Kunda Patch => No
2015-05-16 01:14 Kunda Note Added: 0035148
2015-05-16 01:14 Kunda Target Version => 1.5.1
2016-01-23 17:17 cbradney Target Version 1.5.1 => 1.5.3
2016-12-08 22:04 Kunda Target Version 1.5.3 => 1.5.4