|· Hosting provided by Anduin.net / Øverby Consulting ·|
|Anonymous | Login | Signup for a new account||2013-05-24 22:58 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001036||Scribus||User Interface||public||04-Sep-05 18:42||11-Oct-19 14:21|
|Platform||x86 Linux||OS||Fedora Core||OS Version||1|
|Target Version||Fixed in Version|
|Summary||0001036: Severe performance problem on documents with very large number of linked frames|
|Description||This issue was the result of testing done with a script created by the purpose. I am not aware of anybody trying to actually use Scribus for documents like those created by this script. (correction: No longer the case). I've filed it as low priority for that reason. It's filed as major as it makes the app almost unusable for documents with many linked frames and plenty of text.|
When viewing very large documents containing a long series of linked frames, Scribus redraws the canvas incredibly slowly and consumes 100% CPU while doing so.
The further through the document one is viewing, the faster the redraws are. Page 220 of a 251 page document is quite usable, page 150 is getting quite painful, page 10 is almost unusable, and by page 1 Scribus may hang for minutes. Others with slower systems have reported apparent hangs even on a 43 page cut down version. If enough blank pages are inserted into the beginning of the document that the initial text frame is no longer visible when viewing the start of the document, then things are again fast and usable.
It appears that the linked frames are causing the issue. Perhaps Scribus is recalculating the text flow far more often than it needs to, and for the entire document rather than the visible parts of it.
I wrote another script that scans back through the document and unlinks the frames after saving their content, then restores the content after unlinking. After this script is run on a document, performance is back to normal and the same throughout the document.
|Steps To Reproduce||(1) Download attached scripts 'odyssey.py' and 'odyssey_unlink.py' as well as the file 'odyssey.txt'. Place all three into a directory and cd into it.|
(2) Read the scripts to make sure they won't harm your system by incompetence or malice. Failure to do so is your problem, not mine. I assure you they're designed to be utterly harmless as can be, but can't make any guarantees on incompetence. The use_termination_hack stuff is important for another bug (coming soon) and can be left at True. Consider editing the script to create less than the full document at first though - starting at 40 pages seems sensible on a fast box, 10 on a slow one. Do not set unlink_after_create to True - that's also for the other bug.
(3) Launch scribus from the directory you saved the downloaded files into. (probably not required, but let's do it to make sure).
(4) Script -> Execute Script, choose 'odyssey.py'.
(5) In the resulting file dialog, choose 'odyssey.txt' from wherever you saved it. It's probably already visible if you followed the instructions.
(6) Wait for the script to complete. It'll inform you of what it's doing using the status bar and progress bar.
(7) Note how long it takes after the script terminates before Scribus is usable.
(8) Force a redraw of the page by dragging the properties pallette over the text and off again. Note how long this takes.
(9) Using the page pop-up menu in the bottom toolbar, switch to the last (or second last - in the full 251 page doc the last page is almost empty) page on the document.
(10) note how quickly it redraws, and how quickly you can work on it.
(11) Once you have a feel for the performance difference, etc, run the unlinker script by choosing Script -> Execute Script and running 'odyssey_unlink.py'. It will go through and copy the text out of each frame, unlink the frame, and restore the text. (It'd be nice to be able to unlink without clearing). It also adds some informational frames on what it's done, for debugging.
(12) Note that performance is now consistent and usable throughout the document.
|Additional Information||Test machine uses Python 2.3.3 . Python 2.3 strongly recommended; earlier versions may not run this script correctly.|
|Tags||No tags attached.|
|Attached Files|| odyssey.py [^] (10,866 bytes) 04-Sep-05 18:42|
odyssey_unlink.py [^] (1,738 bytes) 04-Sep-05 18:42
odyssey.txt.bz2 [^] (161,971 bytes) 04-Sep-05 18:43
odyssey.sla.bz2 [^] (172,806 bytes) 04-Sep-05 18:47
wiezasnow12-8.sla.gz [^] (579,374 bytes) 07-Mar-18 13:56
|You will also need to decompress odyssey.txt.bz2 to odyssey.txt. 'odyssey.sla.bz2' is a compressed version of the .sla file generated by the script - without running odyssey_unlink.py - on my system.|
|This issue has now become a problem in a real-world application. I am importing a long file of classified ads (about 2500 ads or more) into 40 pages of linked text frames. After importing the file, Scribus grinds to a near-halt and it is almost impossible to update the document any further.|
|Promoting priority back to normal (I created the bug with priority low) now that someone has hit this in real work.|
I'm hitting this problem in practice as well.
I've got a small book of short stories I'm trying to typeset (27,000 words). I created a new document with "Automatic Text Frames" checked. Then I imported a text file which filled the first page. Then added a load of new pages: the text automatically flowed into them.
But the screen redrawing was painfully slow. CPU goes to 100% for a few seconds on each page, every time you go to it (not just when it's filling it).
I would think this is a fairly common usage?
This is Scribus 220.127.116.11 on Debian unstable, Athlon 1.4 GHz.
|Yep. There seem to be a lot of factors. It's less severe than it was due to general improvements in text rendering speed, but the core issues remain. Hopefully some of them will be addressed in the 1.3.x series. There's some work going on as part of the "great breakage" that should lay the groundwork for that.|
Scribus 18.104.22.168 and (even more) 1.3.4 CVS (compiled in February) are VERY slow when coping with linked text frames, especially if word wrap is activated for them, even if there are only 2 linked frames. The scrolling of the page is awfully slow as is changing paragraph styles, moving frames or pictures, editing text in frames etc.
I uploaded a file (wiezasnow12-9.sla.gz - work in progress without images) where the problem occurs.
|FYI Magnes, Andreas is doing lots of work on the text engine in 1.3.x that should result in much improved rendering speeds and results. His work is coming along very well now.|
|When the new text engine will be ready? I didn't use Scribus 1.3.4 for some time, but the last time I did it was unusable when having many linked frames. I hope to be able to use it instead of 22.214.171.124/10 the next time I'll be making some PDFs :).|
|This issue still exists on 1.3.4. Was doing a test document with 256 pages (because I usually need to do documents this big - books and such), and while repainting isn't so bad, text manipulation is very slow (64-bit turion, 1.6GHz, 1 GB RAM). Loading a text (.txt file has 300 KB) into Scribus took several minutes, and any style manipulations take 30+ seconds each.|
edited on: 07-Aug-26 19:48
I'm not entirely sure, but it looks like Scribus 126.96.36.199CVS is slower than 188.8.131.52 when scrolling (almost as slow as 1.3.4) even with only few (3) linked text frames. I could upload test file but I don't know if it's a good bug report to do it ;).
edit: scrolling is slow when some new text (with word wrap and in linked frame) had to be drawn.
|wiezasnow12-8.sla.gz has 61 pages in xml. In xml, because my Scribus cannot open it. I think the file is so so so so so so complex to handle. I write a book with pictures and texts. I am on 80th page. the file is still 2MB. Your file must be so complex with 27MB. Huhhh.|
edited on: 07-Aug-26 22:20
You should be able to open it if you have 1GB free memory. Although it takes forever on 1.3.4 (maybe even several minutes). It's not so complex, I thing the size is due to some additional data stored by Scribus (image miniatures?) or due to some bug...
PS. I looked into the xml file... There is a lot, lot of something like this:
<ITEXT CAB="64" CCOLOR="Black" CBASE="0" CSTW="-0.1" CSIZE="8.5" CULP="-0.1" CH="o" CSHADE2="100" CKERN="0" CSCALE="100" CSHADE="100" COUT="1" CSCALEV="100" CSTP="-0.1" CULW="-0.1" CSTYLE="128" CFONT="Georgia Regular" CSHX="5" CSHY="-5" CSTROKE="Black" />
<ITEXT CAB="64" CCOLOR="Black" CBASE="0" CSTW="-0.1" CSIZE="8.5" CULP="-0.1" CH="nie Ch" CSHADE2="100" CKERN="0" CSCALE="100" CSHADE="100" COUT="1" CSCALEV="100" CSTP="-0.1" CULW="-0.1" CSTYLE="0" CFONT="Georgia Regular" CSHX="5" CSHY="-5" CSTROKE="Black" />
<ITEXT CAB="64" CCOLOR="Black" CBASE="0" CSTW="-0.1" CSIZE="8.5" CULP="-0.1" CH="a" CSHADE2="100" CKERN="0" CSCALE="100" CSHADE="100" COUT="1" CSCALEV="100" CSTP="-0.1" CULW="-0.1" CSTYLE="128" CFONT="Georgia Regular" CSHX="5" CSHY="-5" CSTROKE="Black" />
Maybe it should be in one ITEXT (all options are the same)? It's really, really strange.
It could be the cause of the time it takes to open the file. (sorry for my English, I hope it's comprehensible)
This issue doesn't directly relate to the XML format. If Scribus is drawing content, the XML formatted content has already been loaded into RAM (entirely), converted to internal objects, and discarded from memory.
There are indeed known issues with the current format (including size, functionality limits, difficulty of direct manipulation, and the lack of any way to validate it as correct) and the team are working on a new format - as well as a lot of other things, which is why it's taking a while.
For file format issues see 0002098.
I'm also getting this problem (with a 48 pages document with two text files running through 47 pages, each).
It also manifests itself when you right click in the first as opposed to the last linked frame.
With 1.3.6svn and a midly modern computer (2Go + Turion 64x2 1.6MHz), it is quite ok to open wiezasnow12-8.sla and edit it. Editing that file is sluggish but doable : it takes about or less than one second to select or apply a style or move an image.
However, loading odyssey.sla (uncompressed from bz2) crashes scribus with a stack overflow after 60 seconds of loading and computing.
Are linked frames stack greedy ?
tried again with 1.4.0 rc6 and almost same conclusion :
- no problem at all with
- odyssee.py doesnt crash scribus but hangs with nicely displayed following message :
Traceback (most recent call last):
File "<string>", line 8, in <module>
File "C:\Users\JLuc\Downloads\odyssey.py", line 67, in <module>
scribus.Justify_Left = scribus.LeftAlign
AttributeError: 'module' object has no attribute 'LeftAlign'
afaict, the constant is scribus.ALIGN_LEFT and not scribus.LeftAlign...
in 1.4, the align constants are:
ALIGN_BLOCK', 'ALIGN_CENTERED', 'ALIGN_FORCED', 'ALIGN_LEFT', 'ALIGN_RIGHT'
|I edited odissey.py file but there are numerous other mistakes, some of them i could sort out, some other i couldnt.|
|04-Sep-05 18:42||ringerc||New Issue|
|04-Sep-05 18:42||ringerc||File Added: odyssey.py|
|04-Sep-05 18:42||ringerc||File Added: odyssey_unlink.py|
|04-Sep-05 18:43||ringerc||File Added: odyssey.txt.bz2|
|04-Sep-05 18:47||ringerc||File Added: odyssey.sla.bz2|
|04-Sep-05 18:48||ringerc||Note Added: 0002288|
|04-Sep-27 10:01||Frank_Cox||Note Added: 0002541|
|04-Sep-27 10:10||ringerc||Note Added: 0002542|
|04-Sep-27 10:10||ringerc||Priority||low => normal|
|04-Sep-27 10:10||ringerc||Description Updated|
|04-Sep-27 10:10||ringerc||Steps to Reproduce Updated|
|04-Oct-19 07:53||ringerc||Relationship added||related to 0001037|
|04-Dec-08 16:59||ringerc||Relationship deleted||related to 0001037|
|04-Dec-08 16:59||ringerc||Relationship added||related to 0001037|
|05-Oct-14 20:29||qp||Note Added: 0007087|
|05-Oct-15 06:48||ringerc||Note Added: 0007091|
|06-Mar-15 17:01||mhanski||Relationship added||child of 0003432|
|06-Apr-02 04:28||ringerc||Status||new => confirmed|
|07-Mar-18 13:56||Magnes||File Added: wiezasnow12-8.sla.gz|
|07-Mar-18 13:57||Magnes||Note Added: 0015555|
|07-Mar-18 17:46||ringerc||Note Added: 0015557|
|07-Jun-15 13:26||Magnes||Note Added: 0016554|
|07-Jul-05 12:41||mecirt||Note Added: 0016745|
|07-Aug-26 19:09||Magnes||Note Added: 0017170|
|07-Aug-26 19:10||Magnes||Note Edited: 0017170|
|07-Aug-26 19:48||Magnes||Note Edited: 0017170|
|07-Aug-26 21:45||timpul||Note Added: 0017171|
|07-Aug-26 22:18||Magnes||Note Added: 0017173|
|07-Aug-26 22:20||Magnes||Note Edited: 0017173|
|07-Aug-27 02:46||ringerc||Note Added: 0017177|
|08-Oct-27 01:49||jghali||Relationship added||has duplicate 0006477|
|09-Apr-08 12:08||ArneBab||Note Added: 0021507|
|09-Dec-28 23:36||JLuc||Note Added: 0023004|
|11-Oct-18 23:56||JLuc||Note Added: 0027047|
|11-Oct-19 08:40||ale||Note Added: 0027048|
|11-Oct-19 14:21||JLuc||Note Added: 0027050|
|Main | My View | View Issues | Change Log | Roadmap|
|Copyright © 2000 - 2013 MantisBT Team|