View Single Post
Old 12-20-2021, 03:47 PM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by KevinH View Post
I will add this to my list of things to look at but in all honesty I will make this very very low on my list of priorities [...]
Yep, definitely a very low priority issue.

Unless there are some severe slowdowns.

Perhaps my test case (~2 second delay) isn't what Dire_Storm is seeing.

Note: I just retested the steps in Calibre Editor, and adding an XHTML file was near-instant.

Maybe it's a case of O(n^2) or O(n^3) sneaking in? (At small-scale # of files, it doesn't matter much, but at large # of files, the "add new file" delay gets dramatically larger.)

Where's Sigil spending that time exactly? Is it a Book Browser update thing? Reading/appending the content.opf?

Quote:
Originally Posted by KevinH View Post
[...] as I have yet to see a printed book with 1500 chapters all in one volume. Small chapters or not. Nor have I ever found a reader that would support a toc for it.
I think the word "chapter" is throwing things off... I think similar would apply to journals (or newspaper-/magazine-like collections of articles).

Remember the behemoth I gave you to test Reports+Spellchecking slowdowns?

Similarly, it was a monthly periodical that ran for 15 years (~1.3 million words, ~900 articles).

Original EPUB can be grabbed here:

https://mises.org/library/complete-l...orum-1969-1984

And attached is a rough HTML-per-article version I created.

* * *

OPF + TOC Filesize Warnings (Side Note)

Like I said earlier... you typically have to pay attention to these key files. You don't want them getting too large, or the ebook may become completely unopenable on certain devices.

In the above EPUB, articles were sensibly combined into logical chunks (by Volume/Issue):
  • 18 Volumes / 164 Issues
  • 4 MB = EPUB
  • 133.27 KB = content.opf
  • 234.50 KB = toc.ncx

If you split each individual article:
  • ~900 articles
  • 4.4 MB = EPUB
    • ~400 KBs added.
  • 237.46 KB = content.opf
    • ~ doubled.
  • 238.86 KB = toc.ncx

If you had more descriptive filenames, like actual article titles, the overhead would be much larger.

Trick: Simplifying Filenames

If you're at/near that ~300 KB tipping point, another trick you can do is simplify your filenames.

I tend to like very human-readable (and easily sortable) filenames:
  • Chapter.01.-.Title.Goes.Here.xhtml
  • pg123.-.Figure.01.-.Name.of.Image.png
  • 2021.01.01.-.Last,First.-.Full.Article.Title.Goes.Here.xhtml
  • Vol.01.Iss.01.-.Art.99.-.Full.Article.Title.Goes.Here.xhtml

But you may want to go with much simpler:
  • Chapter01-01.xhtml
  • Chapter01.xhtml
  • Chap01.xhtml
  • Ch01.xhtml
  • pg123.-.Figure01.png
  • Figure01.png
  • Fig01.png
  • 2021.01.01.-.Article.Title.xhtml
  • 2021.01.01.xhtml
  • Vol.01.Issue.01.-.99.xhtml
  • Vol.01-01-99.xhtml
  • 01-01-99.xhtml

Depending on how many files/links you have throughout, this can cut the filesize down dramatically:
  • Vol.01.Iss.01.-.Art.99.-.Full.Article.Title.Goes.Here.xhtml
  • Vol.01-01-99.xhtml

59 vs. 18 characters.

(Same trick if you have indexes... with thousands and thousands of internal links to pages. A simple change of filenames can cut the index's filesize down by more than half.)
Tex2002ans is offline   Reply With Quote