Re: Achieving very smooth scrolling of large data sets?
From: Roedy Green (look-on_at_mindprod.com.invalid)
Date: 06/25/04
- Previous message: John Doe: "Re: Achieving very smooth scrolling of large data sets?"
- In reply to: John Doe: "Re: Achieving very smooth scrolling of large data sets?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Jun 2004 16:50:33 GMT
On 25 Jun 2004 09:37:59 -0700, spammeallyoucan@hotmail.com (John Doe)
wrote or quoted :
>- For instance the screen fits R records at any time, and
>- the scrollbar is P pixels high, then we need to cache at
>- most P blocks of R records to smoothly scroll through
>- the entire database by mouse, regardless of the size of
>- the database.
No, that's not what I was saying, but what you suggest is an
interesting idea. When people jump around with the scroll bar, you
need only get them approximately to where they asked to go, then let
them fine scroll from there. So you only need cache a selection of
jumping in points, e.g. the start of each letter of the alphabet, and
take them to the nearest one in your cache, and then start frantically
premptively back/forward caching from there.
What I was talking about is the slow response to mousing that can
happen if you get a very large number of components in a complex
layout. The layout manager on receiving a mouse event has to decide
which component it belongs to. The generic way of solving this is to
ask each component in turn, "is this yours?" (speaking very loosely).
I was suggesting speeding this process up my taking advantage of any
regularity in the layout. E.g. if it were a grid of 100 pixel squares
10 across you could compute the row as y/100 and column as x/100. Then
you could compute the component index as row*10 + col which can be
computed in o(0) time.
-- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
- Previous message: John Doe: "Re: Achieving very smooth scrolling of large data sets?"
- In reply to: John Doe: "Re: Achieving very smooth scrolling of large data sets?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|