tags:

views:

29

answers:

0

Hey guys,

I have a doubt. I need to get the data from the sever twice every time when I load a page, one to render the HTML and another one to get the data for client side (javascript).

So I don't know exactly what it's the best way and fastest. I was trying to implement a session object and store the data once using joinedload loading technique. When the data is in the client side, to kill the session object.

Another one it's to call the database twice.

I don't know which one is faster and better because I don't know if the database or server stores the first call in memory. If so it's not like to call the database twice, right?

And if the second choice is better which loading technique (joinedload, eagerload or subqueryload) is better to use.

Every call could be a bunch of data.

Any help could be really useful.

Thanks in advance!