[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

is there a way to pre-load remote objects in the host application?

MR

8/27/2004 1:44:00 PM

i have an application that uses enterprise services remote objects. the
calls are very fast usually within 50ms. EXCEPT for the first time the
object is called or after a long period of inactivity.
is there a way to preload all the objects in the host application so that
even the first call will be fast (as opposed to over 1 second)?
thanks
m


3 Answers

Raghavendra T V

8/27/2004 3:02:00 PM

0

Hi,

1)You can use pre-jiting which will actually precompile and keep the object
( not sure about this )
2)You can use singleton pattern to achieve this (singleton makes sure that
always an instace of that object is in memory )

Hope this helps you.

Thanks
Raghavendra

"MR" <nospam raab at biconix dot com> wrote in message
news:uUVvzvDjEHA.3524@TK2MSFTNGP10.phx.gbl...
> i have an application that uses enterprise services remote objects. the
> calls are very fast usually within 50ms. EXCEPT for the first time the
> object is called or after a long period of inactivity.
> is there a way to preload all the objects in the host application so that
> even the first call will be fast (as opposed to over 1 second)?
> thanks
> m
>
>


MR

8/28/2004 5:29:00 PM

0

1) prejting doesn't cause objects to reside in memory.
2) it is a singleton, singleton doesn;t guaranty that it resides in memory.
it will only ensure that the constructor gets called only once the object is
instantiated

"Raghavendra T V" <raagzvb@hotmail.com> wrote in message
news:%23%23yDFYEjEHA.3148@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> 1)You can use pre-jiting which will actually precompile and keep the
> object
> ( not sure about this )
> 2)You can use singleton pattern to achieve this (singleton makes sure that
> always an instace of that object is in memory )
>
> Hope this helps you.
>
> Thanks
> Raghavendra
>
> "MR" <nospam raab at biconix dot com> wrote in message
> news:uUVvzvDjEHA.3524@TK2MSFTNGP10.phx.gbl...
>> i have an application that uses enterprise services remote objects. the
>> calls are very fast usually within 50ms. EXCEPT for the first time the
>> object is called or after a long period of inactivity.
>> is there a way to preload all the objects in the host application so that
>> even the first call will be fast (as opposed to over 1 second)?
>> thanks
>> m
>>
>>
>
>


msherman

8/31/2004 12:59:00 PM

0

"MR" <nospam raab at biconix dot com> wrote in message news:<uUVvzvDjEHA.3524@TK2MSFTNGP10.phx.gbl>...
> i have an application that uses enterprise services remote objects. the
> calls are very fast usually within 50ms. EXCEPT for the first time the
> object is called or after a long period of inactivity.
> is there a way to preload all the objects in the host application so that
> even the first call will be fast (as opposed to over 1 second)?
> thanks
> m

In chapter 3 of "Advanced .NET Remoting, C# Edition", I believe the
author describes the solution for this (at least for a single object).
It's on page 36 in a section titled "Published Objects". In your
server startup code you construct the object and then pass it to
RemotingServices.Marshal().

Sorry if my answer is way off base. I'm very new to .NET remoting but
I'm in the process of reading the aforementioned book and your
question rang a bell.

Marc