[Qt-interest] Interview and fetchMore()

Philip Scott qt-interest at foo.me.uk
Mon Jun 8 11:26:58 CEST 2009


Hi All,

I have got myself a bit of a project, and I have been delving deep into 
the interview framework to see if it can help me out, and I have reached 
a bit of an impasse. I thought perhaps some of you fine folks might have 
suggestions on the best way to work this, so here goes.

I have a large dataset (very large, hundreds of millions of <time, 
value> pairs). I do various sums and analysis on this data which are 
relatively expensive; to do them on every single point might take 
anything up to a couple of minutes. I am using KDAB's KDChart widget to 
display the results, but right now it is unworkably slow on account of 
my giving it every single point to work with which is clearly 
unnecessary as I don't have hundreds of millions of pixels on my screen. 
KDChart is a nice Qt Citizen, it uses the Interview framework to fetch 
it's data, and what I want to do is a kind of 'lazy' evaluation (the 
folks at KDAB pointed me to 
http://doc.trolltech.com/4.5/model-view-model-subclassing.html#lazy-population-of-model-data 
but I don't think that is quite sufficient for my task, as I will 
describe shortly).

The idea is that you might as an overview display a couple of years 
worth of data, sampling your data-set appropriately and pumping it 
through all the analysis. But then I want to be able to zoom in to a 
particular area and trigger a computation at a finer granularity but 
over a smaller time period. And to be able to repeat this until I get 
right to the bone with the actual points, which are at a millisecond 
resolution.

I can see how I can create a lazy effect like this with 'fetchMore()', 
but that appears to be limited to adding rows and columns to the end of 
the dataset. Is it possible to use it to add rows for a particular 
granularity as you 'zoom in' (so it would need to be parametrized 
somehow for the scale you are currently viewing at; perhaps a start/end 
datetime and a number of samples required).

Any ideas, suggestions, comments etc.. gladly recieved!



More information about the Qt-interest-old mailing list