Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow "get font information" for some PDF files #4258

Open
kjk opened this issue May 23, 2024 · 1 comment
Open

Slow "get font information" for some PDF files #4258

kjk opened this issue May 23, 2024 · 1 comment

Comments

@kjk
Copy link
Member

kjk commented May 23, 2024

Build 3.6.16229

Test file: same as in #4018

Show document prorties, Get font list.

This is very slow because this file is just collection of jpx images and they all need to be decoded when we run:

 27     libmupdf.dll!fz_run_page_contents(fz_context * ctx, fz_page * page, fz_device * dev, fz_matrix transform, fz_cookie * cookie) 
 28     SumatraPDF-dll.exe!fz_new_stext_page_from_page2(fz_context * ctx, fz_page * page, const fz_stext_options * options, fz_cookie * cookie) 
 29     SumatraPDF-dll.exe!EngineMupdf::GetFzPageInfo(int pageNo, bool loadQuick, fz_cookie * cookie) 
*30     SumatraPDF-dll.exe!EngineMupdf::ExtractFontListTemp() 
 31     SumatraPDF-dll.exe!EngineMupdf::GetPropertyTemp(DocumentProperty prop) 
 32     SumatraPDF-dll.exe!DisplayModel::GetPropertyTemp(DocumentProperty prop) 
 33     SumatraPDF-dll.exe!GetProps(DocController * ctrl, PropertiesLayout * layoutData, bool extended) 

In this context we don't need to build stext.

Maybe only collect info about images on rendered pages because this info is only used for some mouse interactions.

@GitHubRulesOK
Copy link
Collaborator

Again that file is a good test case for the issue as on this slow machine it takes Acrobat reader around 30 seconds to say there is only one OCR font in the whole file thus presumably is visiting each page to do so. SumatraPDF takes 150 seconds or more !

Tracker Exchange takes a while to open but at under 30 seconds) shows the one font almost instantly without its hinting at rescanning the resources ? But they as editor are perhaps more focused on indexing such page resources during load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants