bugGNU gv - Bugs: bug #63280, gv is taking much time to render a...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #63280: gv is taking much time to render a pdf that pdf viewer in linux render almost instantly

Submitter:  elias tsolis <estatistics>
Submitted:  Thu 27 Oct 2022 05:25:21 PM UTC
   
 
Category:  PDF rendering Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  None

Jump to the original submission

Mon 31 Oct 2022 05:49:00 PM UTC, comment #9: 

Search path:
   /usr/share/ghostscript/9.53.3/Resource/Init :
   /usr/share/ghostscript/9.53.3/lib :
   /usr/share/ghostscript/9.53.3/Resource/Font :
   /usr/share/ghostscript/fonts : /var/lib/ghostscript/fonts :
   /usr/share/cups/fonts : /usr/share/ghostscript/fonts :
   /usr/local/lib/ghostscript/fonts : /usr/share/fonts
Ghostscript is also using fontconfig to search for font files
For more information, see /usr/share/doc/ghostscript/Use.htm.
On debian system you may need to install ghostscript-doc package.
Please report bugs to bugs.ghostscript.com.


i had no  ghostscript-doc package installed. I installed it.


No paths have been set
elias@eliasc:~/Downloads$ printenv | grep GS_
elias@eliasc:~/Downloads$ printenv | grep GS_*
NVM_CD_FLAGS=


Strace log (for some days ~600kb).
https://ufile.io/85vjbmpr



elias tsolis <estatistics>
Sun 30 Oct 2022 04:18:30 PM UTC, comment #8: 

In your screen capture, 'Arguments' is '-dFIXEDMEDIA-dFIXEDMEDIA-dFIXEDMEDIA-dFIXEDMEDIA'. It should be just a single '-dFIXEDMEDIA'. It is not necessary to repeat it four times, and repeating it with no space might set a variable with the name 'FIXEDMEDIA-dFIXEDMEDIA-dFIXEDMEDIA-dFIXEDMEDIA' instead of setting 'FIXEDMEDIA'.

William Bader <william8000>
Sun 30 Oct 2022 04:11:33 PM UTC, comment #7: 

If gs took 0m53.922s (nearly a minute), the problem is gs, not gv.

> I think the problem is about font paths.


I agree. The file displays instantly for me with several versions of gs.

Try running `gs -h` and looking at the `Search path:` list near the end.
Also try running `printenv | grep GS_` to see if you have set GS_OPTIONS, GS_FONTPATH, or GS_LIB

The search path might have a directory with a huge number of files or a directory that is a slow network mount.

If you want to see everything that gs is trying to open, you can use `strace`, for example, `strace -e openat gs sample@file.pdf`

> Yes it is ok to share it.


Thanks. I think that it shows an issue with gs 10.

William Bader <william8000>
Sun 30 Oct 2022 02:40:36 PM UTC, comment #6: 

Yes it is ok to share it.
Yes gv is build from source, but i didnt changed something, if i remember correctly.

If i must have the last edition, then i must build from source most.

I attached screenshot of the gs options.

Yes, i had no specific problem with other multi-page pdfs.

I think the problem is about font paths.

Time:
real 0m53.922s
user 0m1.077s
sys 0m0.366s



elias tsolis <estatistics>
Sat 29 Oct 2022 10:26:48 PM UTC, comment #5: 

I meant to show how many seconds the `time` command returned.

Your gs installation has a strange search path with items like `/usr/share/ghostscript/9.53.3/Resource/Font//usr/share/ghostsc.` Check if you set any environment variables with `set | grep GS_` or if you built gs from source, check if you customized the build.

I think that the errors that I had were from gs 10, and your file might be ok. Is it OK if I pass that file to the gs developers in a bug report?

gv works from postscript. When it gets a pdf, it runs the pdf through pdf2dsc to find the list of pages and pdf2ps to convert it to postscript. You can see the commands if you start gv and then on the menu bar at the top, click on `State -> Ghostscript Options...` If your gs search path is an indication of a messed up gs installation, maybe some of the gs parts that gv uses aren't installed correctly.

Do other multi-page pdf files work in gv for you?

William Bader <william8000>
Sat 29 Oct 2022 05:35:42 PM UTC, comment #4: 
elias tsolis <estatistics>
Sat 29 Oct 2022 05:32:02 PM UTC, comment #3: 

 time gs -dNOPAUSE -sDEVICE=x11 sample.pdf  -c quit

resulted:

`GPL Ghostscript 9.53.3 (2020-10-01)
Copyright (C) 2020 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Processing pages 1 through 2.
Page 1
Querying operating system for font files...
Substituting font Times-Roman for Times New Roman.
Loading NimbusRoman-Regular font from /usr/share/ghostscript/9.53.3/Resource/Font/NimbusRoman-Regular... 4989012 3641260 21725224 19758669 4 done.
Can't find (or can't open) font file /usr/share/ghostscript/9.53.3/Resource/Font//usr/share/g.
Can't find (or can't open) font file Arial-BoldMT.
Loading Arial-BoldMT font from /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf... 5128492 3795135 22774472 20791534 4 done.
Can't find (or can't open) font file /usr/share/ghostscript/9.53.3/Resource/Font//usr/sh.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 5149076 3823895 23870104 21875902 4 done.
Can't find (or can't open) font file /usr/share/ghostscript/9.53.3/Resource/Font//usr/share/ghostsc.
Can't find (or can't open) font file Arial-BoldItalicMT.
Loading Arial-BoldItalicMT font from /usr/share/fonts/truetype/msttcorefonts/arialbi.ttf... 5169276 3834005 24615312 22572701 4 done.
Page 2
Substituting font Times-Roman for Times New Roman.
Can't find (or can't open) font file /usr/share/ghostscript/9.53.3/Resource/Font//usr/sh.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 5373964 4026851 9871684 8463694 4 done.`

elias tsolis <estatistics>
Thu 27 Oct 2022 08:51:08 PM UTC, comment #2: 

It works quickly for me on Fedora 36 with gv 3.7.4 from my git clone and gs 10.00.0.

Try running
  time gs -dNOPAUSE -sDEVICE=x11 -email is unavailable- -c quit

On my laptop, it shows the pages and exits in 0.2 seconds.
If it takes much longer for you, the problem is gs (ghostscript) not gv.

When I run the gs command above, I get the errors below. gv and gs are unpredictable on corrupt files. See if you can make a PDF with no errors that takes much longer in gv than gs.

The following errors were encountered at least once while processing this file:
        error executing PDF token

   ** This file had errors that were repaired or ignored.
   ** The file was produced by:
   ** >>>> �� <<<<
   ** Please notify the author of the software that produced this
   ** file that it does not conform to Adobe's published PDF
   ** specification.


William Bader <william8000>
Thu 27 Oct 2022 05:26:57 PM UTC, comment #1: 

version latest (3.7.3.90) in kde linux with bullseye 11 edition.

elias tsolis <estatistics>
Thu 27 Oct 2022 05:25:21 PM UTC, original submission:  

gv is taking much time to render a pdf that pdf viewer in linux render almost instantly

elias tsolis <estatistics>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #53923:  Επιλογή_052.jpg added by estatistics (148KiB - image/jpeg)
file #53914:  sample@file.pdf added by estatistics (682KiB - application/pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by william8000 (Posted a comment)
  • -email is unavailable- added by estatistics (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-30 estatistics Attached File- Added Επιλογή_052.jpg, #53923
    2022-10-27 estatistics Attached File- Added sample@file.pdf, #53914

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code