Menu

(no subject)

Andreas
2024-10-04
2024-10-07
  • Andreas

    Andreas - 2024-10-04

    Hi all,
    i have situation, that if im opening a folder in seeddms which is containing some documents (pdf) mostly with one page this is very slow to see them as preview-picture (see attached screenshot in file). But also if im waiting until all appeared and then going to another folder and coming back to the original then the slow times reappearing.

    Then i watched the logfiles and have seen no problems. I also watched into the cache folder and there are Cached files in there like that

    ./png/1224:
    total 244
    -rw-r--r--   1 www-data www-data  12861 Jul 22 13:04 p1-100.png
    drwxr-xr-x   2 www-data www-data   4096 Oct  4 09:21 .
    -rw-r--r--   1 www-data www-data 192227 Oct  4 09:21 p1-400.png
    drwxr-xr-x 729 www-data www-data  20480 Oct  4 09:24 ..
    -rw-r--r--   1 www-data www-data   9062 Oct  4 13:58 p1-80.png
    

    Some folders has only one png.
    Because it is reproducable i asked me if i have a problem that it cannot access the preview-pictures and generates them every time newly?

    Command i have in there:

    gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q '%f' | convert -resize %wx png:- '%o'
    

    It is what i read in documentation. But 5 to 13 seconds im thinking is much more time as i would expect if an existing has to be read from cache on an ssd disk and delivered to webclient with a size about 11KB.

    Is there a possibility to find out a reason why it is so slow/why or if it is not using the pregenerated pngs from cache-disk?

     

    Last edit: Andreas 2024-10-04
  • Andreas

    Andreas - 2024-10-04

    Subject (cannot set any more): 6.0.28 slow Preview of Document Folders

     
  • Uwe Steinmann

    Uwe Steinmann - 2024-10-04

    5 to 13 secs are too long. How long does it take to run the gs command on the command line?
    You could try some of the other commands in doc/README.Converters.md

     
  • Andreas

    Andreas - 2024-10-04

    i changed now to convert -density 100 -resize %wx '%f[0]' 'png:%o' and its a little bit faster (screenshot) each about 1-3s

    On commandline i tested one manually:

    root@6c28f20105ad:/var/www/seeddms/data/1048576/1357# time convert -density 100 -resize 10% 1.pdf 'png:bla.png'
    
    real    0m1.776s
    user    0m1.006s
    sys 0m0.263s
    

    but shouldnt it use if im doing things a second time the pregenerated png from cache, which should be much faster?

     
  • Uwe Steinmann

    Uwe Steinmann - 2024-10-04

    If the conversion works, it should place the preview image in the cache/png/<docid>/and take it from there the next time.

    If you like contact me at info@seeddms.org and I can you with some extensions which helps debugging this.

     
  • Andreas

    Andreas - 2024-10-07

    Hi Uwe,
    thank you very much for your offer. On weekend i got out that most of the time comes from my reverseproxy. If im thinking about the timings then from 10 seconds waiting about 2 seconds is from application-server and the rest about 8 from proxy itself.
    Next 2 weeks im on holidays and cannot evaluate more.
    But i improved it by adding a headerline so second time it gets it from local browsercache. This is possible because im using my dms only for archiving documents which are never changing after upload
    add_header 'Cache-Control' "public, max-age=2592000";
    which works fine as a temporary workaround and will search for the reason behind it.
    Maybe later i will write you for your debugtools because 2 seconds for streaming a pregenerated png with about 10k size i would expect some ten milliseconds... Will let you know then.

    Thanks in meantime for all.

     

Log in to post a comment.

MongoDB Logo MongoDB