View Issue Details

IDProjectCategoryView StatusLast Update
0007870ScribusStory Editor / Text Framespublic2009-03-16 23:18
Reportermecirt Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86-64OSlinuxOS Versionopensuse 11
Product Version1.3.5svn 
Fixed in Version1.3.5svn 
Summary0007870: Document check with many linked text frames slow (patch attached)
DescriptionThe part of the document check that checks for missing glyphs is very slow when used on a document with many linked text frames. This is because the check is repeated for each frame, checking the whole text each time - ending up with the whole document being repeatedly checked many times. This significantly slows down all operations where this check is performed, most notably quitting and printing.

The attached patch resolves this problem - for each frame, only glyphs rendered within that frame are being checked.
TagsNo tags attached.
Patch

Activities

2009-03-14 19:39

 

doccheck-speedup.patch (1,095 bytes)   
Index: scribus/documentchecker.cpp
===================================================================
--- scribus/documentchecker.cpp	(revision 13290)
+++ scribus/documentchecker.cpp	(working copy)
@@ -133,7 +133,7 @@
 				if (!(fformat == ScFace::SFNT || fformat == ScFace::TTCF))
 					itemError.insert(WrongFontInAnnotation, 0);
 			}
-			for (int e = 0; e < currItem->itemText.length(); ++e)
+			for (int e = currItem->firstInFrame(); e <= currItem->lastInFrame(); ++e)
 			{
 				uint chr = currItem->itemText.text(e).unicode();
 				if ((chr == 13) || (chr == 32) || (chr == 29) || (chr == 28) || (chr == 27) || (chr == 26) || (chr == 25))
@@ -251,7 +251,7 @@
 				if (!(fformat == ScFace::SFNT || fformat == ScFace::TTCF))
 					itemError.insert(WrongFontInAnnotation, 0);
 			}
-			for (int e = 0; e < currItem->itemText.length(); ++e)
+			for (int e = currItem->firstInFrame(); e <= currItem->lastInFrame(); ++e)
 			{
 				uint chr = currItem->itemText.text(e).unicode();
 				if ((chr == 13) || (chr == 32) || (chr == 29) || (chr == 28) || (chr == 27) || (chr == 26) || (chr == 25))
doccheck-speedup.patch (1,095 bytes)   

jghali

2009-03-15 00:27

administrator   ~0021306

Applied! Thanks!

Issue History

Date Modified Username Field Change
2009-03-14 19:39 mecirt New Issue
2009-03-14 19:39 mecirt File Added: doccheck-speedup.patch
2009-03-14 19:42 christoph_s Status new => assigned
2009-03-14 19:42 christoph_s Assigned To => jghali
2009-03-15 00:27 jghali Note Added: 0021306
2009-03-15 00:27 jghali Status assigned => resolved
2009-03-15 00:27 jghali Fixed in Version => 1.3.5svn
2009-03-15 00:27 jghali Resolution open => fixed
2009-03-16 23:18 cbradney Status resolved => closed
2015-09-17 20:08 Kunda Category Story Editor / Text Frames => Story Ed/Txt Frames
2015-09-17 20:12 Kunda Category Story Ed/Txt Frames => Story Editor / Text Frames