[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

clip joints.....



Fellow MCL-ers,
        I'm using scrolling-windows.  My scrolling-window contains a
scroller, which in turn contains a whole bunch of static-text-dialog-items.

        If I have more than about 100 of these static-text items, scrolling
becomes very, very slow (half a second/line of scrolling).

        The problem seems to be that view-draw-contents is being called for
the static-text items *way to often* - even if they aren't on the screen,
or haven't changed.  I can get a 50% speed up just by checking if the
static-text items are  inside the visible part of the window (*).

        What I'd like to do is find the portion of the window that is both
visible and needs to be updated.  Neither clip-region, or view-clip-region
(undocumented) are what I want - they just correspond to the whole visible
part of the window.

NOTE:
(*):  I do this by checking the static-text-dialog-item sits inside the
rectangle formed by (scroll-position my_scroller) and (add-points
(scroll-position my_scroller) (view-size my_scroller)).

         Thnx,
           Tom