Mobileread
Importing "big" XHTML files in Sigil
#1  paulpeer 03-18-2010, 04:51 AM
I have a rather huge XHTML file. It is 3,7 MB long and has links to 25 pictures with an average of 10 KB each.

First I tried to import it in Sigil 0.2.0 on a Mac Snow Leopard. After about 10 minutes the first chapter was shown in the book view, perfectly, even with the pictures in it. As soon as I tried to save this version, the beach ball started spinning (equivalent to the hour glass in Windows) and after 15 minutes of waiting I saw that the program was frozen.

Then I tried to import it in Sigil 0.1, which was a succes. Here in the code view I "cleaned" the source and got rid of many unnecessary things such as a few thousand "lang=...", "color=..." etc. This reduced the file to less than 1 MB.

Now I imported it again in Sigil 0.2.0. This worked, but very very slowly. Splitting into chapters costs 10 minutes per chapter. I've done 10 chapters of the 50 by now ...

Any suggestions, apart from doing all the work in a text editor, as in the good old days before Sigil?

BTW, I've tried to "chunk" the file in Calibre, but this didn't work either.

EDIT: Maybe I should add that the book has about 250 footnotes (links), what probably will slow up Sigil's work.
Reply 

#2  Valloric 03-18-2010, 07:01 AM
In the next beta, you should be able to do chapter splitting in the Code View, by marking where you want the chapter breaks and then perform a "Split on SGF chapter breaks" operation.

So if you have a very large file, you switch to Code View, add all the break markers and then split it. That should cut down the time it takes to split things.

The halt-on-save... do you have any images with spaces in the filenames? That causes the current beta to freeze on save. It's already fixed.

The long load time for large HTML files... that's still QtWebKit. I can't do anything about it.

But!

There have been some recent developments in QtWeBkit regarding the rendering speed on Windows, and in QtWebkit 2.0 (scheduled for May 2010), it should become an order of magnitude faster.

At least, that's what the Nokia devs tell me. You can see the discussion in the linked issue report.

Let's hope they actually stick by their word this time.
Reply 

#3  paulpeer 03-18-2010, 07:42 AM
Quote Valloric
The halt-on-save... do you have any images with spaces in the filenames? That causes the current beta to freeze on save. It's already fixed.
Yes, there were spaces in the filenames. I've removed these with Sigil 0.1, then went back to 0.2. Everything works fine now, except from the 10 minutes needed for splitting every chapter.

I am splitting them now one by one (so first chapter first, then second, etc.). Would it make things better to split in the middle first (so after chapter 30 if there are 60), then again in the middle (after chapter 15 and after 45)?
Reply 

#4  Valloric 03-18-2010, 09:26 AM
Quote paulpeer
I am splitting them now one by one (so first chapter first, then second, etc.). Would it make things better to split in the middle first (so after chapter 30 if there are 60), then again in the middle (after chapter 15 and after 45)?
Yes, it's what I currently do myself and what I recommend to others for the time being.
Reply 

#5  Dave_S 03-18-2010, 12:44 PM
Quote paulpeer
Now I imported it again in Sigil 0.2.0. This worked, but very very slowly. Splitting into chapters costs 10 minutes per chapter. I've done 10 chapters of the 50 by now ...

Any suggestions, apart from doing all the work in a text editor, as in the good old days before Sigil?
I have a primitive but effective way of speeding up chapter break operations by at least an order of magnitude. I use Sigil 0.1.3 to do all my chapter break insertions, because later versions in the 0.1 series became horrendously slow to insert chapter breaks. I really like Sigil 0.2, but I am still keeping Sigil 0.1.3 around for inserting chapter breaks in a monolithic file.
Reply 

#6  sandb0x 03-18-2010, 12:45 PM
How do the tabs actually work in 0.2.0 beta? (Btw it took me some time to find the tab ref, under window. Not even a rudimentary Help file, so pretty hostile to an ordinary, non-tech, user.)
I split a large file, using calibre conversion from txt to epub and setting it (as I believe, to cut it into portions no larger than 200 Kb. Opened the epub (it's 584 Kb) in sigil, and the first bit, title page, opened, as I believe it should. But doing the tab action had no effect.
Sorry if this sounds majorly clueless but I am sure I am like the 90% of people who will ultimately use sigil with no need or interest in what's under the bonnet. I love the prog but am often baffled.
Reply 

#7  theducks 03-18-2010, 01:42 PM
Quote sandb0x
How do the tabs actually work in 0.2.0 beta? (Btw it took me some time to find the tab ref, under window. Not even a rudimentary Help file, so pretty hostile to an ordinary, non-tech, user.)
I split a large file, using calibre conversion from txt to epub and setting it (as I believe, to cut it into portions no larger than 200 Kb. Opened the epub (it's 584 Kb) in sigil, and the first bit, title page, opened, as I believe it should. But doing the tab action had no effect.
Sorry if this sounds majorly clueless but I am sure I am like the 90% of people who will ultimately use sigil with no need or interest in what's under the bonnet. I love the prog but am often baffled.
On the left there is the Book Browser with 5 Categories.
Open (Expand down)
Text: Now you see the files that make up the Body of you document.
Styles: The stylesheet being used
Images: and pictures being used (img tags in document)

Back to Text
Here is where you open the section you wish to work upon. Note: there is a bug in this release that does not permit spaces in the file_names_listed. Edit out the spaces (names in use will be saved).
Double click to open the section. Splitting a section will automatically create a new entry in Text The assigned numbers are not important, the document saves in the order that it appears in the list.
You can drag a text section to a different document position.

I suggest saving, before closing any tab. This is beta software

these are my observations. As you noted, there is little documentation at this time.
Reply 

#8  Valloric 03-18-2010, 02:40 PM
Quote sandb0x
How do the tabs actually work in 0.2.0 beta?
Have you tried double-clicking a file in the Book Browser?

Quote sandb0x
(Btw it took me some time to find the tab ref, under window. Not even a rudimentary Help file, so pretty hostile to an ordinary, non-tech, user.)
Hostile? You may be exaggerating things a bit.

I've put aside a couple of weeks in April to start writing some decent docs, and a kind user is putting together an "epub creation guide using Sigil" on the wiki.
Reply 

#9  sandb0x 03-19-2010, 05:00 AM
Thanks everyone for all the very useful advice. I withdraw "hostile", I really only meant "unhelpful". For instance, I had no idea what the drop-down panel on the left did.
You have a lot on your plate developing such a powerful tool and we are all very grateful.
One bug which I wish you could fix is Paypal (I do not like the alternative) but I guess that is out of your control.
Reply 

Today's Posts | Search this Thread | Login | Register