>
> Well, in fact, what I wanted to know what is better:
>>
>
1) Load ALL registers into an array of <objects>, that has the drawback of 
memory comsumption OR
2) Load an object when required. 

I mean:

I have a programm with a list of objects (movies in my case, like a 
videoclub). This list, contains 50 movies to show the title. When the user 
scrolls down, the list show the next registers. If I load all the objects, 
these objects are in memory, and when the user scrolls the page, we don't 
need to load from disk to memory, to show in the list. But this is memory 
intensive, as you know.
Other option that I have currently, is to detect when the user scrolls the 
bar and call the code to load a register from database. The drawback with 
this, is that when the user scrolls fast this bar, the program is always 
loading registers one by one, and thus, scratching the disk (sorry for this 
sentence, I'm spaniard).  I would like to know, how real developers handle 
this case. I suppose they load pages of 50 registers, and so on, but I 
don't know really.

Could anybody help me with that?
 

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/3Pusss9Tzu4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to