ICEpdf
  1. ICEpdf
  2. PDF-380

Make page column view no-paint on scroll smarter

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.3
    • Fix Version/s: 5.0.4
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      any

      Description

      A forum user brought up the point that the while the mouse is down on a column page view's scroll bar page initialization and painting is suspended. The reason for this is to avoid initializing a whole bunch of pages via a fast scroll. However the logic is pretty simple, if we are in a scrolling state then we don't draw the page.

      It should be fairly straight forward to alter the behaviour so that painting would begin if the scrolling speed was sufficiently low. This should create more positive user feedback but avoid excess loading on a fast scroll.

        Activity

        Hide
        Patrick Corless added a comment - - edited

        Comment out the following lines

        if (parentScrollPane != null &&
        parentScrollPane.getVerticalScrollBar().getValueIsAdjusting())

        { return; }
        Show
        Patrick Corless added a comment - - edited Comment out the following lines if (parentScrollPane != null && parentScrollPane.getVerticalScrollBar().getValueIsAdjusting()) { return; }
        Hide
        K Steimle added a comment -

        Will this one be part of 5.1, it has been posponed two times now?

        Show
        K Steimle added a comment - Will this one be part of 5.1, it has been posponed two times now?
        Hide
        Patrick Corless added a comment -

        Attached a very basic smart scroll patch. I won't be adding this to 5.0.3 but a variant of it will be in 5.1. Recommend you apply the patch to the src bundle to see if provides the functionality you wanted.

        Show
        Patrick Corless added a comment - Attached a very basic smart scroll patch. I won't be adding this to 5.0.3 but a variant of it will be in 5.1. Recommend you apply the patch to the src bundle to see if provides the functionality you wanted.
        Hide
        Patrick Corless added a comment -

        added a system property org.icepdf.core.views.scroll.initThreshold which can control the initialization delay. Out of the box the dirty timer is running every 5ms, and a check is done to see if we've scrolled more then 150px. If so we don't initialize the page, so the basic idea is slow scrolls of < 150px we initialized the page otherwise we don't init as we're likely scrolling too fat to keep up with the page inits and will saturate the thread pool with init requests.

        Show
        Patrick Corless added a comment - added a system property org.icepdf.core.views.scroll.initThreshold which can control the initialization delay. Out of the box the dirty timer is running every 5ms, and a check is done to see if we've scrolled more then 150px. If so we don't initialize the page, so the basic idea is slow scrolls of < 150px we initialized the page otherwise we don't init as we're likely scrolling too fat to keep up with the page inits and will saturate the thread pool with init requests.
        Hide
        Patrick Corless added a comment -

        Making as fixed.

        Show
        Patrick Corless added a comment - Making as fixed.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: