Quote Originally Posted by wysota View Post
Imagine you get two subsequent calls for the model:
1. index(0, 0)
2. index(rowCount()-1, 0)
When model created i am seek through whole file and create QHash of all items offsets. key = row, value = qint64(offset)
And when i need to get item data i am seek directly to interesting pos in file and read it.

Quote Originally Posted by wysota View Post
How did you implement rowCount()?
rowCount equals to hash size

Quote Originally Posted by wysota View Post
you said you store only that part of data which is visible. And that doesn't correspond to MVC. Especially that now you say you don't store any data
When i told model storing data (in "Million example") i meen it provide this amount of data. See the attached file in my second post.
In that example no any data readed by model. Only QTableView works for painting empty cells. And it works quite slow then i am try to scroll it up/down very quickly

Quote Originally Posted by wysota View Post
I suggest you at least introduce some caching or indexing and try to run your application under a profiler to see what slows it down the most.
Then i debug my application most time spended to repaint QTableView ...

P.S. Jal' ja ne mogu tolkom ob`jazsnit' to chto mne nujno. My english is too bad ...