11-29-2009, 02:52 PM | #46 |
Member
Posts: 16
Karma: 10
Join Date: Nov 2009
Device: Sony PRS-600
|
First of all, thank you for putting your time and effort in Sigil. I've only just started with it but it looks promising. The only real issue being that it's rather slow, but I understand that's mainly due to Webkit and you've already found a solution for that so hooray .
I'm really happy with the search and replace, which wasn't there before (or I've been blind), especially because it supports regular expressions. I'm having some trouble with them tough, but that seems to be because different flavours of regexps. I run into that with Calibre all the time, too. Anyway, I'll be trying some other regexp testers than the one I currently use because I'm beginning to suspect it differs from most other libraries in its interpretation of the expressions. Something I'm pretty sure there is an issue with is sudden changes of text size. As you can see in the attached screenshot, the text size between to chapters differs though under the hood I can't see anything different. Sorry if this has been brought up before, I couldn't find it on the forums. This is a plain text file that I imported and converted to LRF using Calibre. Since I don't have access to the original text file on this computer, I used Calibre to convert the LRF to HTML which I opend with Sigil. Edit: Something else, when working in the split view, Sigil often crashes when switching between them. Btw, I'm running Vista x64 on an AMD Phenom quadcore something with 3gigs of ram. Last edited by Punksmurf; 11-29-2009 at 03:05 PM. |
11-29-2009, 03:24 PM | #47 |
Sigil Developer
Posts: 8,098
Karma: 5450184
Join Date: Nov 2009
Device: many
|
More on Speed on Mac vs Windows
Hi,
FYI, I have access to Parallels Desktop for Mac OSX (a virtual machine) and I have Windows XP installed on it and installed Sigil for Windows. I was able to load and manipulate the exact same large book in Sigil on Mac OS X side by side on the same machine with Sigil for Windows. Even though Sigil for Windows was running in a virtual machine in a window on MacOSX, it was much much faster than how it operates on MacOSX natively. The search and replace in Book view seemed to work much better under Windows (but after almost every change after a search or even simply hitting the chapter break button, the search start point even though I used Find Next reverted to the top of the file). Searching simply freaked things out on the Mac OSX native side. The ToC wait was much shorter under Windows emulation and even manipulating the Book View window itself was much faster under Windows emulation. In short, I would be better off running it under a virtual machine with its overhead than directly on the Mac itself. This is strange. What compiler optimizations are being used for the Mac OSX build (-O2 ?) Are the binaries and executables being stripped to speed loading? Are the Qt libraries made with the same compiler optimizations? Anyway, thought you would like to know that the speed issue seems to be Mac OS X specific. If you want I can set up a build system under Mac OSX using gcc and do a build and see if I can see anything particularly weird going on. Hope this helps, KevinH |
11-29-2009, 03:42 PM | #48 |
Member
Posts: 16
Karma: 10
Join Date: Nov 2009
Device: Sony PRS-600
|
Okay, I've been toying around with regular expressions.
I've the following regexp: Code:
<span>(.*?(\w)\2\2.*<\/span>) Code:
<p class="calibre1"><span>I had to nod.</span></p> <p class="calibre1"><span>"We're loading furniture right now. The ship is the Empress-out of Brysta, Nordla Lines. I'm Caron."</span></p> <p class="calibre1"><span>"Is this your dangergeld?" I blurted.</span></p> <p class="calibre1"><span>She laughed. "Not exactly. I started as a purser on the Brotherhood ships, but traveling got old. I liked dealing with cargo and making up shipments, handling the cube and stowage calculations-"</span></p> <p class="calibre1"><span>Whhhheeee . . .</span></p> <p class="calibre1"><span>"-Excuse me . . ." She was back at the cart, deftly jockeying two more crates into the net, without seeming to work up a sweat.</span></p> <p class="calibre1"><span>Whheeeeppp . . .</span></p> <p class="calibre1"><span>As the net lifted away, Caron returned. "So that's how I ended up here. I have a small farm not too far from Sigil, in the low hills north of the High Road. I spend my free time there."</span></p> Code:
<span class="sgc-5">$1 I've attached a screenshot of the offline version of RegExr, which I normally use, so if I'm not clear in my explanations, hopefully the image will be . |
11-29-2009, 03:46 PM | #49 | ||||||
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Here is the documentation for the QRegExp class used internally in Sigil. It documents these engines quite nicely. Quote:
This is probably related to the specific CSS styles you have in the document. Quote:
Quote:
Quote:
Quote:
Then again, it's always possible I screwed up the compile, although I highly doubt this. By all means, please do. Any help/insight you can provide is greatly appreciated. You can contact me by PM or email if you need help setting this up. |
||||||
11-29-2009, 03:50 PM | #50 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
You are using non-greedy matching applied to specific quantifiers. Those aren't supported by QRegExp. To achieve a similar effect, set the "Minimal matching" option in the F&R dialog.
|
11-29-2009, 03:52 PM | #51 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
11-29-2009, 04:14 PM | #52 | |||||
Member
Posts: 16
Karma: 10
Join Date: Nov 2009
Device: Sony PRS-600
|
Quote:
Quote:
An important note I spotted (for those wanting to dabble in regexp search, too), is that DOTALL is always true: Code:
Matches any character (including newline). Code:
[^\r\n] Quote:
Quote:
Quote:
Thanks, yet again. Haven't got to the point of trying to replace yet, but you're saving me a headache there . I'm confident I'll get trough my first book quite satisfactory! Last edited by Punksmurf; 11-29-2009 at 04:26 PM. |
|||||
11-29-2009, 06:56 PM | #53 |
Member
Posts: 16
Karma: 10
Join Date: Nov 2009
Device: Sony PRS-600
|
Woah. I really don't get this.
I'm looking for the next regexp: Code:
</span></p>\n\n <p><span>file:\/\/.*txt</span></p>\n\n <p><span> But it won't replace! Not anything... I began with a space, and thought that was the problem, but a number of different strings yielded no results either. Other search/replace queries I've done work fine however (chapeau!). |
11-29-2009, 07:00 PM | #54 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Create an issue on the tracker. Attach the epub file and this regex.
|
11-30-2009, 12:17 AM | #56 | |
Wizard
Posts: 2,981
Karma: 11862367
Join Date: Apr 2008
Device: Sony Reader PRS-T2
|
Quote:
I know 0.15 installed to /opt but I can't find 0.13! |
|
11-30-2009, 10:28 AM | #57 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
12-01-2009, 07:40 AM | #58 |
Wizard
Posts: 2,981
Karma: 11862367
Join Date: Apr 2008
Device: Sony Reader PRS-T2
|
|
12-01-2009, 09:07 AM | #59 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Then you just deleted the shortcut . Use "locate -b sigil".
Last edited by Valloric; 12-01-2009 at 09:10 AM. |
12-01-2009, 09:58 AM | #60 |
Sigil Developer
Posts: 8,098
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Speed on MacOSX
Hi,
FYI: I finished my build on MacOSX from source. The good news is that the build was very very clean and used -O3 optimization as you said. The bad news is that the slow speed is still there. My guess is that Qt on Mac OSX is simply not being optimized or is just darn slow. Because of the impact of larger html files and given how lightening fast Tidy is, my guess is the problem is related to the Qt html widget and/or redrawing. If that is the case, unless there is some way to split the large html books into smaller pieces automatically (some type of chapter by chapter auto splitting? - or a really smart dom parsing routine) and then assigning a different Qt html widget for each segment, I am not sure what is anything can be done. Since X11 is now integrated right into Mac OS X (not an add-on anymore since Mac OS X 10.5), I tried to find a version of qt-x11 to rebuild against just to see how it compares for speed to native Qt but qt-x11 for Mac OS X doesn't seem to exist anyplace on the Qt (nokia) site anymore. The only other thing is building Qt from source itself against X11 on Mac OS X just to see? If I get some free time I will do that. I also have access to a Linux box (still running Fedora 8 - so no Qt - 4.5.3 pieces installed) that once I update to Fedora 11 or 12, I will try it for comparison speed purposes. Hope this info is useful. Please let me know if there is anything I can test or do to help. Take care, KevinH |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil 0.2.4 | Valloric | Sigil | 16 | 09-09-2010 11:04 AM |
Sigil 0.2.3 | Valloric | Sigil | 16 | 06-25-2010 10:59 AM |
Sigil 0.2.1 | Valloric | Sigil | 23 | 06-22-2010 02:52 AM |
Sigil | Marc_liest | Software | 19 | 06-01-2010 12:59 AM |
Sigil v0.1.2 | Valloric | Sigil | 52 | 08-18-2009 03:15 AM |