sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.58k stars 1.73k forks source link

EPUB Of 11 MB Taking 25+ Seconds To Load In 3.5 PreRelease (Unresolved) #2859

Open alienfxfiend opened 2 years ago

alienfxfiend commented 2 years ago

I've reported this before, but it's unresolved for 4+ months, & I've waited for updates to fix it but it's taking 40 seconds to open an EPUB file of 11,265 KB ! You said it would take 2 seconds to load but it hangsup the app for 25+-40 seconds to load. I tried renaming it & putting it in the root drive, then making it launch as administrator, but nothing fixes it. It opens PDF's instantly but large EPUB's are lagging like crazy. I currently am using Sumatra 3.2 64bit until it's resolved but I don't have access to TextFiles which Sumatra 3.5 opens. If you need any Debug or Log files let me know. Sumatra is an indispensable tool for me in my research so could you please do something about this ? Thanks in advance ! 🥺 (Addison-Wesley Microsoft Technology Series) Mark Michaelis-Essential C# 7.0-Addison-Wesley Professional (2018).zip P.S: I'am running Windows 10 Enterprise Edition Build No. 19043.1865 (up-to-date.)

GitHubRulesOK commented 2 years ago

re downloaded and atempt to extract image

so shortened the name right click open with SumatraPDF 3 seconds later (its a big file for an epub) although its 16.0 MB in 162 Files (mainly 128 image files across the 16,785,408 bytes)

Primary lag will be unpacking those contents to view in order since as a simple non epub zip it would be well under a second for those image pages, biggest file is the humungous css to keep adjusting text styling.

Removing all history to see raw opening time I tried open that file alone and its 2-3 seconds on its own

However I admit that in 3.1.2 its neigh on instant but then the render engine was much different (simpler without css).

alienfxfiend commented 2 years ago

re downloaded and atempt to extract image

so shortened the name right click open with SumatraPDF 3 seconds later (its a big file for an epub) although its 16.0 MB in 162 Files (mainly 128 image files across the 16,785,408 bytes)

Primary lag will be unpacking those contents to view in order since as a simple non epub zip it would be well under a second for those

Removing all history to see raw opening time I tried open that file alone and its 2-3 seconds on its own

Strange, PDF version of it opens almost instantly. Oh well, guess I'll go back to Sumatra 3.2.

alienfxfiend commented 2 years ago

Well the issue here is the dev told me the EPUB opens for him in 2 seconds after a patch, but that's not the case for me, which is why I bring it up again ! & hence I'm unable to keep abreast /w the latest versions (3.5) —missing out on TXT files support !

GitHubRulesOK commented 2 years ago

txt files used to open in all versions, image

but perhaps not as a listed .ext, the core difference with the new engine is it tries to resolve the cascade of styles and that particular calibre cascade looks to me like Niagara fails, but for me the 21,000 lines of searching ends in line 21023 @ under 4 seconds

couldn't find system font 'sans-serif'
couldn't find system font 'source sans pro'
couldn't find system font 'sans-serif'
CreateControllerForEngine: 'C:\Users\WDAGUtilityAccount\Documents\Addison-Wesley.Microsoft.Technology.Series.Mark.Michaelis-Essential.C.7.0-Addison-Wesley.Professional.2018\Essential C# 7.0-Addison-Wesley Professional.epub', 1594 pages
             LoadDocument: 3875.68 ms, 1594 pages for 'C:\Users\WDAGUtilityAccount\Documents\Addison-Wesley.Microsoft.Technology.Series.Mark.Michaelis-Essential.C.7.0-Addison-Wesley.Professional.2018\Essential C# 7.0-Addison-Wesley Professional.epub'
DisplayModel::BuildPagesInfo started
DisplayModel::BuildPagesInfo took 0.09 ms
alienfxfiend commented 2 years ago

No SumatraPDF 3.2 (the version which loads EPUB speedily, does NOT have support for textfiles, as shown in the screenshot ! So I need the latest version, but it hangs my system for a LONG time while loading EPUBs ! No Txt Compatibility

GitHubRulesOK commented 2 years ago

Ahh to read text in 3.2 the UI must be fixed image

image

Or try 3.3 where it is automatic image

alienfxfiend commented 2 years ago

Thanks a lot, I didn't know about the Toggle Ebook UI feature —works well !

GitHubRulesOK commented 2 years ago

Hmm thinking about your issue the root could be too many fonts I have 81 active in main OS and only 77 in working (sandbox) OS How many items are in your C:\windows\fonts folder ?

alienfxfiend commented 2 years ago

551 items

GitHubRulesOK commented 2 years ago

Ok that might be the cause (~6.8 times delay? not the observed 20 times slower but there can be other factors too) as other apps that have to trawl/crawl large font libraries complain. So I think this is related to the new MuPDF engine needs to search font library over and over for each not found text font.

@kjk when font is first time not found can MuPDF be flagged to not search for the same documents missing text line resources over and over? OR at that first fail use a fallback for all repeat calls Related https://github.com/sumatrapdfreader/sumatrapdf/issues/2669