Skip to content
  • Albert Astals Cid's avatar
    Make PageView::notifyViewportChanged call "itself" with a queued connection · 0c4ed4c0
    Albert Astals Cid authored
    This increases the UI responsiveness on opening PDF that are slow to render
    This is because we can only have one thread using the pdf because of
    poppler, if we do not queue this call, it will immediately try to generate
    the pixmap for this page ending up in the thread for rendering being started.
    But then while we are still opening the file we will ask if the file
    has embedded files, and this means accessing poppler again and we will be
    stuck there because the rendering thread has still not finished. This way by
    delaying the execution until we return to the event loop we guarantee
    all short queries that are done while opening the file are done already and
    we won't block the UI
    0c4ed4c0