![]() |
#46 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Actually, now that I think some more about it, how will knowing the parent tree be enough to support absolute positioning. For example suppose that you use absolute positioning to position a semitransparent box in the upper left corner of the document as a sort of overlay. Also suppose that the <div> representing this box i sthe last element in the document tree. Now when you are rendering the first page, how will you know that the upper left corner needs a box overlay unless you've parsed the rest of the tree?
|
![]() |
![]() |
![]() |
#47 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,550
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
I admit I am ignorant of the details, but I wonder...
When you talk about the "parse tree", do you mean (grosso modo) the set of tags in an XHTML file without their content (text)? If the location of these tags in the XHTML file is indexed, wouldn't that be enough for the renderer in order know the right format to apply (it would know the tag context for any text location)? Wouldn't it then be enough to keep this index in memory instead of the full XHTML file? How much would this index take? I guess not too much, usually a negligible amount. |
![]() |
![]() |
Advert | |
|
![]() |
#48 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
As I pointed out, it is certainly possible to discard the text from the parse tree in memory, but that wont change the speed limitations imposed by having to parse the full XHTML file in the first place.
|
![]() |
![]() |
![]() |
#49 | |
Zealot
![]() ![]() ![]() ![]() Posts: 114
Karma: 325
Join Date: May 2009
Device: Cool-ER
|
Quote:
If your viewer allows the user to change the DOM/CSS then it faces exactly the same issues. On a PC, that's not a problem. On a resource restricted device such as a low-end e-reader, you have to ask yourself if providing such functionality is going to provide the user with a poor experience. If your software does supports changes to the DOM or CSS, there is no reason why it cannot work to update indexes in quite an efficient manner. Certainly any change that will affect indices can be transformed into a delta and that applied over the index (which itself is a relatively small set of structures, so has minimal performance penalty). In that case, re-indexing will be far more efficient that a full re-parse of the document - which is what you're proposing. Absolutely untrue - in fact quite the reverse. If you manage document updates as deltas to the index information, then having pre-indexed documents gives faster updates than un-indexed ones that will require a complete re-parse to ensure you are displaying the correct information. |
|
![]() |
![]() |
![]() |
#50 | |
Zealot
![]() ![]() ![]() ![]() Posts: 114
Karma: 325
Join Date: May 2009
Device: Cool-ER
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#51 | ||||
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
![]() Quote:
Quote:
Quote:
|
||||
![]() |
![]() |
![]() |
#52 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
![]() |
![]() |
![]() |
#53 | |
Zealot
![]() ![]() ![]() ![]() Posts: 114
Karma: 325
Join Date: May 2009
Device: Cool-ER
|
Quote:
As for page boundaries, these are useful in any device that shows documents in page sized lumps and where the user expects to be able to go to a given page. It's a metaphor that will hang around for a very long time, not only as the one that makes sense in paper books, but also as a comprehensible measure of your location (one that makes much more sense than being 53.4% into a book!). |
|
![]() |
![]() |
![]() |
#54 | ||
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
Also please tell me what these browsers you worked on are, so I can go uninstall them from all my machines. Seriously, where did you learn to think? Quote:
Last edited by kovidgoyal; 06-21-2009 at 01:45 PM. |
||
![]() |
![]() |
![]() |
#55 |
Zealot
![]() ![]() ![]() ![]() Posts: 114
Karma: 325
Join Date: May 2009
Device: Cool-ER
|
|
![]() |
![]() |
![]() |
#56 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#57 |
sleepless reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,763
Karma: 615547
Join Date: Jan 2008
Location: Germany, near Stuttgart
Device: Sony PRS-505, PB 360° & 302, nook wi-fi, Kindle 3
|
Oh well, i guess it's time to close the discussion on those technical details.
![]() I have a growing interest in starting an alternative project for creating a ePub reading system. I have to mull over this a little bit and will take a look into the FBReader sources (as well as into the sources of Calibres eBook-viewer ![]() |
![]() |
![]() |
![]() |
#58 | |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 554
Karma: 2928497
Join Date: Mar 2008
Device: Clara 2E & Sage
|
Quote:
Although some feathers got ruffled in the process, I think this was a useful and enlightening discussion. It never hurts to have this type of discussion from people with different backgrounds and different amounts of experience. |
|
![]() |
![]() |
![]() |
#59 | |
Zealot
![]() ![]() ![]() ![]() Posts: 114
Karma: 325
Join Date: May 2009
Device: Cool-ER
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#60 | ||
sleepless reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,763
Karma: 615547
Join Date: Jan 2008
Location: Germany, near Stuttgart
Device: Sony PRS-505, PB 360° & 302, nook wi-fi, Kindle 3
|
Quote:
Quote:
"Yes, we can". ![]() It will take a little while before i will start a new thread on this topic because i have to pick up a lot of informations first...starting a successfull and "long-term survivable" open source project isn't that easy as i know from my own experience. Edit: Hm, interesting problem. I've to admit that i don't have a solution for this problem yet. Last edited by netseeker; 06-21-2009 at 06:21 PM. |
||
![]() |
![]() |
![]() |
Tags |
epub, mobi |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert Epub and Msreader formats to Kindle formats | bruc79 | Calibre | 17 | 06-22-2010 04:50 AM |
Other formats than ePub or Zip? | Robotech_Master | Calibre | 4 | 05-28-2009 02:15 PM |
Converting epub to other formats | garygibsonsf | ePub | 6 | 05-06-2009 12:25 PM |
Formats for PRS-505 / Mobipocket | thorswitch | Sony Reader | 6 | 06-07-2008 08:43 PM |
Announcing: MOBI2IMP v9 will directly convert mobipocket .prc to .IMP formats | nrapallo | Kindle Formats | 4 | 03-22-2008 01:38 AM |