View Issue Details

IDProjectCategoryView StatusLast Update
0008481ScribusUsabilitypublic2015-12-04 10:26
ReporterMike Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Product Version1.3.5svn 
Target VersionFixed in Version 
Summary0008481: [PATCH] optimise Enable/Disable Preview mode
Descriptionoptimise Enable/Disable Preview mode

 - for long documents it is horribly slow (what about change only actual page?)
Tagspatch
PatchYes

Relationships

related to 0008078 acknowledged Preview (fast mode) 
has duplicate 0009881 closedcbradney Preview mode is too slow 
has duplicate 0010816 closedcbradney View > Preview mode triggers an autosave 
child of 0012007 new [MetaBugPatch] Port BAlpha new features to 1.5 so as to merge them with SVN 

Activities

Mike

2010-03-12 10:03

reporter   ~0023498

This bug is related to 0008078.

Would be complicated to render only visible page/pages and when the visible pages change, it would automatically render the visible one?

ale

2012-06-29 05:40

manager   ~0028320

since the other bug report has been closed: what is the reason to autosave the document before going into preview mode? is it really necessary?

ale

2012-06-30 09:52

manager  

preview_enhance.diff (513 bytes)
diff --git a/Scribus/scribus/scribusview.cpp b/Scribus/scribus/scribusview.cpp
index fa328ae..5b0b736 100644
--- a/Scribus/scribus/scribusview.cpp
+++ b/Scribus/scribus/scribusview.cpp
@@ -463,11 +463,6 @@ void ScribusView::togglePreview()
 	ScGuardedPtr<ScribusDoc> docPtr = Doc->guardedPtr();
 	Doc->recalculateColors();
 	Doc->recalcPicturesRes();
-//	repaintContents(QRect());
-	if (docPtr) // document may have been destroyed in-between
-	{
-		DrawNew();
-	}
 }
 
 void ScribusView::changed(QRectF re, bool)
preview_enhance.diff (513 bytes)

ale

2012-06-30 09:56

manager   ~0028329

removing the call to DrawNew() avoids the call to the autosave...

it does not seem to have any consequences here and the switch between the preview mode and normal mode seems to work correctly.

if anybody has a (good) reason to keep DrawNew() in togglePreview() just write about it and i will digg further into the issue...

jghali

2012-06-30 11:50

administrator   ~0028332

DrawNew() is necessary because it enforces proper canvas rendering mode.

Enabling preview mode does not trigger any call to autosave here. The progress bar one can see is related to images being reloaded in order to apply proper view settings.

ale

2012-06-30 19:19

manager   ~0028337

i'm getting curious... i will try to look into DrawNew().....

BAlpha

2014-03-24 07:53

reporter   ~0031544

What makes the preview toggling extremely slow for me is the fact that when turning it on and off, Scribus reloads all images in the document, which takes a long time since my documents often have a lot of images in them.

As far as I can see, this reloading is unnecessary at least for how I use Scribus, so I've patched my version to skip this reloading step by default. The patch is part of my collection at https://bitbucket.org/balpha/scribus-patches/wiki/Home.

This probably shouldn't be applied to mainline Scribus as-is, since I assume there are cases where the reloading would actually make a difference. But for people who use Scribus like I do and build it themselves, this patch may help.

JLuc

2014-03-25 22:19

developer   ~0031558

If the choice is
- either to have quickly a preview when user requests a preview
or
- take a long time to reload all images each time the user requests a preview

then i think the first option is best

all the more since the image reload may/can/could/should be triggered - explicitely = only when needed - with the "Extra > Update document" allready existing menu option.

Kunda

2015-12-02 16:51

manager   ~0037799

Last edited: 2015-12-02 22:16

View 2 revisions

Balpha's patch (which is now somewhat obsolete) is at:

Description: https://bitbucket.org/balpha/scribus-patches/wiki/Home#markdown-header-quick-preview-mode-toggle

Patch:
https://bitbucket.org/balpha/scribus-patches/src/513abb291ff7f356c7f8403ee139d421339074f4/quick-preview-toggle.patch?fileviewer=file-view-default

Quick preview mode toggle
When you turn preview mode on and off, Scribus reloads and recalculates each and every picture in the document. There are probably cases where images are shown differently with and without preview mode, but in my use, it never makes a difference. Thus the only thing this reloading/recalcing does for me is making the toggle infuriatingly slow in documents with a decent amount of pictures, even though all I wanted was to hide guides/frame borders/etc. for a second.
This patch changes the behavior of the "toggle preview" button in the window's bottom right to not recalc the pictures after toggling the mode, making the switch between the modes very quick. To get the old behavior, either long-click the button and then click the "Recalc pictures after switch" that pops up, or toggle the mode via the View menu, not the button.


ale

2015-12-04 10:26

manager   ~0037813

please, no long clicks...

if the current behavior is really needed offer this a setting...

but i really wonder if this behavior should not be the only one available.

does anybody know why the images are reloaded?

Issue History

Date Modified Username Field Change
2009-09-30 09:28 Mike New Issue
2010-03-12 10:03 Mike Note Added: 0023498
2011-03-27 14:33 cbradney Relationship added has duplicate 0009881
2012-06-28 21:22 cbradney Relationship added has duplicate 0010816
2012-06-29 05:40 ale Note Added: 0028320
2012-06-30 09:52 ale File Added: preview_enhance.diff
2012-06-30 09:56 ale Note Added: 0028329
2012-06-30 09:57 ale Summary optimise Enable/Disable Preview mode => [PATCH] optimise Enable/Disable Preview mode
2012-06-30 11:50 jghali Note Added: 0028332
2012-06-30 19:19 ale Note Added: 0028337
2014-03-24 07:53 BAlpha Note Added: 0031544
2014-03-25 22:19 JLuc Note Added: 0031558
2014-03-31 21:59 JLuc Tag Attached: patch
2014-10-24 23:00 Kunda Patch => Yes
2015-12-02 12:41 Kunda Relationship added related to 0008078
2015-12-02 16:51 Kunda Note Added: 0037799
2015-12-02 17:01 Kunda Relationship added child of 0012007
2015-12-02 22:16 Kunda Note Edited: 0037799 View Revisions
2015-12-04 10:26 ale Note Added: 0037813