Thread: Sigil v0.1.5
View Single Post
Old 12-01-2009, 03:14 PM   #64
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Mac OSX Speed issues

Hi,

Thanks for you reply. I will download the new Qt 4.6 for Mac OSX and give it a test run to see if it helps anything (speedwise) on MacOSX.

Also, thanks for pointing me at your auto-split issue set for version 0.2.0.
I have bookmarked it and when I finally get up to speed on all of your code, I may try to help out during my free time by submitting bug fix patches for things that are not of immediate importance (i.e minor nits)

One trick I have used to find large html auto-split points is to use Tidy to move everything to strict xhtml, enclose text, and indent text (--doctype strict, --enclose-text yes -i ).

Finding a good split point, then is reduced down to reading and counting entire lines and when a limit is reached simply look for the next line that is NOT indented by Tidy (not in any other block element) and use that as a split point. This keeps you from splitting inside paragraphs or blocks of text.

This seems to work well in most e-books I have tried it with.

So for 0.2.0 instead of having users insert their own chapter breaks when loading a large html file, instead show a small "preview" of the book (like a Print Preview mode in Excel where you get to assign page breaks) with auto split points marked ala the above via Tidy and have them okay or move the split points, as the first step.

The nice thing is that using indents from Tidy means, I do not have to walk the entire file keeping track of open tags to find the best points to break (tidy does that), all I look at is the element indent level (simply count leading spaces before the next element begins) to decide where to split.

Thanks for all of your hard work on Sigil!

KevinH
KevinH is offline   Reply With Quote