HighTechTalks DotNet Forums  

Performance Problem with AppDomains

Dotnet Framework (Performance) microsoft.public.dotnet.framework.performance


Discuss Performance Problem with AppDomains in the Dotnet Framework (Performance) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
MoriCristian
 
Posts: n/a

Default Performance Problem with AppDomains - 09-27-2005 , 04:45 PM






Greetings
I'm experiencing this problem

I have a class in an assembly with a single method PerformCalcs()
If I load the assembly in the main AppDomain and call PerformCalcs() the
execution time is aboput 10ms.
If I load a new AppDomain, I load the assembly using a remote loader and
then I call PerformCalcs() the execution time is aboun one minutes!!

Can anyone figure out why? The PerformCalcs has it's own objects, so no
remoting is here!

Please Help!



Reply With Quote
  #2  
Old   
MoriCristian
 
Posts: n/a

Default RE: Performance Problem with AppDomains - 09-27-2005 , 04:51 PM






Sorry, I had a breackoint on.
So, without AppDomains, 10msec. With AppDomains 4 seconds.

Please Help!

Regards
MoriCristian

"MoriCristian" wrote:

Quote:
Greetings
I'm experiencing this problem

I have a class in an assembly with a single method PerformCalcs()
If I load the assembly in the main AppDomain and call PerformCalcs() the
execution time is aboput 10ms.
If I load a new AppDomain, I load the assembly using a remote loader and
then I call PerformCalcs() the execution time is aboun one minutes!!

Can anyone figure out why? The PerformCalcs has it's own objects, so no
remoting is here!

Please Help!



Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default RE: Performance Problem with AppDomains - 09-28-2005 , 03:13 AM



Hi Mori,

Welcome to MSDN newsgroup.
From your description, you have a certain class which has a PerformCalcs()
method , you have tried load the class's assembly in .net app's main
appdomain and a separated appdomain and call that class instance's
PerformCalcs() method. You found that when calling in separate domain, the
method will take much more time to complete, yes?

As for calling class instance remotely (cross appdomain), it'll involve
many cross boundary processing, such as paramter, method callcontext
marshaling/unmarshaling. These operations will all have impact on the
performance. However, I also think 4 seconds still seems a bit too long.
I'm not sure how you actually reference the class instance remotely and
call the method, also what you've done in the method body. If convenient,
I'd suggst you provide the complete code sinppet so that I can perform some
tests on my local side, at least we can confirm whether 4 seconds is the
expected time or environment specific.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
Quote:
Thread-Topic: Performance Problem with AppDomains
thread-index: AcXDpS7DDnEF00gNSOCUVZ7u99lApQ==
X-WBNR-Posting-Host: 81.208.74.179
From: =?Utf-8?B?TW9yaUNyaXN0aWFu?= <CristianMori (AT) nospam (DOT) nospam
References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
Subject: RE: Performance Problem with AppDomains
Date: Tue, 27 Sep 2005 13:51:07 -0700
Lines: 25
Message-ID: <EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD (AT) microsoft (DOT) com
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.performance
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSF TNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3698
X-Tomcat-NG: microsoft.public.dotnet.framework.performance

Sorry, I had a breackoint on.
So, without AppDomains, 10msec. With AppDomains 4 seconds.

Please Help!

Regards
MoriCristian

"MoriCristian" wrote:

Greetings
I'm experiencing this problem

I have a class in an assembly with a single method PerformCalcs()
If I load the assembly in the main AppDomain and call PerformCalcs()
the
execution time is aboput 10ms.
If I load a new AppDomain, I load the assembly using a remote loader
and
then I call PerformCalcs() the execution time is aboun one minutes!!

Can anyone figure out why? The PerformCalcs has it's own objects, so no
remoting is here!

Please Help!





Reply With Quote
  #4  
Old   
MoriCristian
 
Posts: n/a

Default Re: Performance Problem with AppDomains - 09-28-2005 , 04:35 AM



Hi Steven, thanks for your reply.
The code is quite too long... I'll try to make it short to see if any
advice is possible.

I have this class

[Serializable]
public class Data
{
//Lot's of data.
}

I load in another appdomain an assembly. This assembly has a class with
this public method

class MyClass
{
//.....
public Data PerformCalc(Data obj)
{
//Do some calculation using obj
return(obj);
}
}

Once I tryed deriving Data from MarshallByRef, but it took far too long
to compute singe all read/write on the data pass through the trasparent
proxy.
So I pass the Data object by value and I return it. This way I thought
that the only overhaead would have been the two serialize/deserialize.
Probably I was wrong.

The non AppDomain version take a very short time to compleate. We are in
the order of 100ms. The AppDomain version take more than 3 seconds.

Even so, I still think that this is too much time since the calculation
is performend in a function that does not comunicate with other AppDomains.

Moreover, If I change the code this way

class MyClass
{
//.....
public Data PerformCalc()
{
Data obj=new Data();
//Do some calculation using obj
return(obj);
}
}

The function is very fast!
Moreover also this

class MyClass
{
//.....
public Data PerformCalc(Data obj)
{
//Do Nothing
return(obj);
}
}

if fast as well, so I think that the problem is not in the function
itself or in the serialize/deserialize of the data but with the data
handling itself.
Is there any difference between doing Data obj=new Data() rather than
receveing it from the deserialization apart the deserialization itself?

I hope that this help you understand my problem.
If needed, I could send you a zip with the code...
let me know please

Regards
Cristian Mori
Steven Cheng[MSFT] wrote:
Quote:
Hi Mori,

Welcome to MSDN newsgroup.
From your description, you have a certain class which has a PerformCalcs()
method , you have tried load the class's assembly in .net app's main
appdomain and a separated appdomain and call that class instance's
PerformCalcs() method. You found that when calling in separate domain, the
method will take much more time to complete, yes?

As for calling class instance remotely (cross appdomain), it'll involve
many cross boundary processing, such as paramter, method callcontext
marshaling/unmarshaling. These operations will all have impact on the
performance. However, I also think 4 seconds still seems a bit too long.
I'm not sure how you actually reference the class instance remotely and
call the method, also what you've done in the method body. If convenient,
I'd suggst you provide the complete code sinppet so that I can perform some
tests on my local side, at least we can confirm whether 4 seconds is the
expected time or environment specific.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
| Thread-Topic: Performance Problem with AppDomains
| thread-index: AcXDpS7DDnEF00gNSOCUVZ7u99lApQ==
| X-WBNR-Posting-Host: 81.208.74.179
| From: =?Utf-8?B?TW9yaUNyaXN0aWFu?= <CristianMori (AT) nospam (DOT) nospam
| References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
| Subject: RE: Performance Problem with AppDomains
| Date: Tue, 27 Sep 2005 13:51:07 -0700
| Lines: 25
| Message-ID: <EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.performance
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3698
| X-Tomcat-NG: microsoft.public.dotnet.framework.performance
|
| Sorry, I had a breackoint on.
| So, without AppDomains, 10msec. With AppDomains 4 seconds.
|
| Please Help!
|
| Regards
| MoriCristian
|
| "MoriCristian" wrote:
|
| > Greetings
| > I'm experiencing this problem
|
| > I have a class in an assembly with a single method PerformCalcs()
| > If I load the assembly in the main AppDomain and call PerformCalcs()
the
| > execution time is aboput 10ms.
| > If I load a new AppDomain, I load the assembly using a remote loader
and
| > then I call PerformCalcs() the execution time is aboun one minutes!!
|
| > Can anyone figure out why? The PerformCalcs has it's own objects, so no
| > remoting is here!
|
| > Please Help!
|
|
|


Reply With Quote
  #5  
Old   
AT
 
Posts: n/a

Default Re: Performance Problem with AppDomains - 09-29-2005 , 09:03 AM



Thanks for your detailed response.

I'll have a look and perform some tests according to the code snippets.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
Quote:
Date: Wed, 28 Sep 2005 10:35:35 +0200
From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: Re: Performance Problem with AppDomains
References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD...soft (DOT) com
<c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl>
Quote:
In-Reply-To: <c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl
Newsgroups: microsoft.public.dotnet.framework.performance
NNTP-Posting-Host: host90-120.pool8536.interbusiness.it 85.36.120.90
Lines: 1
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3700
X-Tomcat-NG: microsoft.public.dotnet.framework.performance

Hi Steven, thanks for your reply.
The code is quite too long... I'll try to make it short to see if any
advice is possible.

I have this class

[Serializable]
public class Data
{
//Lot's of data.
}

I load in another appdomain an assembly. This assembly has a class with
this public method

class MyClass
{
//.....
public Data PerformCalc(Data obj)
{
//Do some calculation using obj
return(obj);
}
}

Once I tryed deriving Data from MarshallByRef, but it took far too long
to compute singe all read/write on the data pass through the trasparent
proxy.
So I pass the Data object by value and I return it. This way I thought
that the only overhaead would have been the two serialize/deserialize.
Probably I was wrong.

The non AppDomain version take a very short time to compleate. We are in
the order of 100ms. The AppDomain version take more than 3 seconds.

Even so, I still think that this is too much time since the calculation
is performend in a function that does not comunicate with other
AppDomains.

Moreover, If I change the code this way

class MyClass
{
//.....
public Data PerformCalc()
{
Data obj=new Data();
//Do some calculation using obj
return(obj);
}
}

The function is very fast!
Moreover also this

class MyClass
{
//.....
public Data PerformCalc(Data obj)
{
//Do Nothing
return(obj);
}
}

if fast as well, so I think that the problem is not in the function
itself or in the serialize/deserialize of the data but with the data
handling itself.
Is there any difference between doing Data obj=new Data() rather than
receveing it from the deserialization apart the deserialization itself?

I hope that this help you understand my problem.
If needed, I could send you a zip with the code...
let me know please

Regards
Cristian Mori
Steven Cheng[MSFT] wrote:
Hi Mori,

Welcome to MSDN newsgroup.
From your description, you have a certain class which has a
PerformCalcs()
method , you have tried load the class's assembly in .net app's main
appdomain and a separated appdomain and call that class instance's
PerformCalcs() method. You found that when calling in separate domain,
the
method will take much more time to complete, yes?

As for calling class instance remotely (cross appdomain), it'll involve
many cross boundary processing, such as paramter, method callcontext
marshaling/unmarshaling. These operations will all have impact on the
performance. However, I also think 4 seconds still seems a bit too
long.
I'm not sure how you actually reference the class instance remotely and
call the method, also what you've done in the method body. If
convenient,
I'd suggst you provide the complete code sinppet so that I can perform
some
tests on my local side, at least we can confirm whether 4 seconds is
the
expected time or environment specific.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
| Thread-Topic: Performance Problem with AppDomains
| thread-index: AcXDpS7DDnEF00gNSOCUVZ7u99lApQ==
| X-WBNR-Posting-Host: 81.208.74.179
| From: =?Utf-8?B?TW9yaUNyaXN0aWFu?= <CristianMori (AT) nospam (DOT) nospam
| References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
| Subject: RE: Performance Problem with AppDomains
| Date: Tue, 27 Sep 2005 13:51:07 -0700
| Lines: 25
| Message-ID: <EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.performance
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3698
| X-Tomcat-NG: microsoft.public.dotnet.framework.performance
|
| Sorry, I had a breackoint on.
| So, without AppDomains, 10msec. With AppDomains 4 seconds.
|
| Please Help!
|
| Regards
| MoriCristian
|
| "MoriCristian" wrote:
|
| > Greetings
| > I'm experiencing this problem
|
| > I have a class in an assembly with a single method PerformCalcs()
| > If I load the assembly in the main AppDomain and call
PerformCalcs()
the
| > execution time is aboput 10ms.
| > If I load a new AppDomain, I load the assembly using a remote
loader
and
| > then I call PerformCalcs() the execution time is aboun one minutes!!
|
| > Can anyone figure out why? The PerformCalcs has it's own objects,
so no
| > remoting is here!
|
| > Please Help!
|
|
|




Reply With Quote
  #6  
Old   
MoriCristian
 
Posts: n/a

Default Re: Performance Problem with AppDomains - 10-04-2005 , 04:28 AM



Hi Steven,
do you have any news?

Thanks
Cristian Mori

Steven Cheng[MSFT] wrote:
Quote:
Thanks for your detailed response.

I'll have a look and perform some tests according to the code snippets.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Date: Wed, 28 Sep 2005 10:35:35 +0200
| From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
| User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
| X-Accept-Language: en-us, en
| MIME-Version: 1.0
| Subject: Re: Performance Problem with AppDomains
| References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD...soft (DOT) com
c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| In-Reply-To: <c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| Content-Type: text/plain; charset=ISO-8859-1; format=flowed
| Content-Transfer-Encoding: 7bit
| Message-ID: <#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl
| Newsgroups: microsoft.public.dotnet.framework.performance
| NNTP-Posting-Host: host90-120.pool8536.interbusiness.it 85.36.120.90
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3700
| X-Tomcat-NG: microsoft.public.dotnet.framework.performance
|
| Hi Steven, thanks for your reply.
| The code is quite too long... I'll try to make it short to see if any
| advice is possible.
|
| I have this class
|
| [Serializable]
| public class Data
| {
| //Lot's of data.
| }
|
| I load in another appdomain an assembly. This assembly has a class with
| this public method
|
| class MyClass
| {
| //.....
| public Data PerformCalc(Data obj)
| {
| //Do some calculation using obj
| return(obj);
| }
| }
|
| Once I tryed deriving Data from MarshallByRef, but it took far too long
| to compute singe all read/write on the data pass through the trasparent
| proxy.
| So I pass the Data object by value and I return it. This way I thought
| that the only overhaead would have been the two serialize/deserialize.
| Probably I was wrong.
|
| The non AppDomain version take a very short time to compleate. We are in
| the order of 100ms. The AppDomain version take more than 3 seconds.
|
| Even so, I still think that this is too much time since the calculation
| is performend in a function that does not comunicate with other
AppDomains.
|
| Moreover, If I change the code this way
|
| class MyClass
| {
| //.....
| public Data PerformCalc()
| {
| Data obj=new Data();
| //Do some calculation using obj
| return(obj);
| }
| }
|
| The function is very fast!
| Moreover also this
|
| class MyClass
| {
| //.....
| public Data PerformCalc(Data obj)
| {
| //Do Nothing
| return(obj);
| }
| }
|
| if fast as well, so I think that the problem is not in the function
| itself or in the serialize/deserialize of the data but with the data
| handling itself.
| Is there any difference between doing Data obj=new Data() rather than
| receveing it from the deserialization apart the deserialization itself?
|
| I hope that this help you understand my problem.
| If needed, I could send you a zip with the code...
| let me know please
|
| Regards
| Cristian Mori
| Steven Cheng[MSFT] wrote:
| > Hi Mori,
|
| > Welcome to MSDN newsgroup.
| > From your description, you have a certain class which has a
PerformCalcs()
| > method , you have tried load the class's assembly in .net app's main
| > appdomain and a separated appdomain and call that class instance's
| > PerformCalcs() method. You found that when calling in separate domain,
the
| > method will take much more time to complete, yes?
|
| > As for calling class instance remotely (cross appdomain), it'll involve
| > many cross boundary processing, such as paramter, method callcontext
| > marshaling/unmarshaling. These operations will all have impact on the
| > performance. However, I also think 4 seconds still seems a bit too
long.
| > I'm not sure how you actually reference the class instance remotely and
| > call the method, also what you've done in the method body. If
convenient,
| > I'd suggst you provide the complete code sinppet so that I can perform
some
| > tests on my local side, at least we can confirm whether 4 seconds is
the
| > expected time or environment specific.
|
| > Thanks,
|
| > Steven Cheng
| > Microsoft Online Support
|
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
|
|
|
|
| > --------------------
| > | Thread-Topic: Performance Problem with AppDomains
| > | thread-index: AcXDpS7DDnEF00gNSOCUVZ7u99lApQ==
| > | X-WBNR-Posting-Host: 81.208.74.179
| > | From: =?Utf-8?B?TW9yaUNyaXN0aWFu?= <CristianMori (AT) nospam (DOT) nospam
| > | References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
| > | Subject: RE: Performance Problem with AppDomains
| > | Date: Tue, 27 Sep 2005 13:51:07 -0700
| > | Lines: 25
| > | Message-ID: <EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD (AT) microsoft (DOT) com
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.performance
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSF TNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.performance:3698
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.performance
| > |
| > | Sorry, I had a breackoint on.
| > | So, without AppDomains, 10msec. With AppDomains 4 seconds.
| > |
| > | Please Help!
| > |
| > | Regards
| > | MoriCristian
| > |
| > | "MoriCristian" wrote:
| > |
| > | > Greetings
| > | > I'm experiencing this problem
| > |
| > | > I have a class in an assembly with a single method PerformCalcs()
| > | > If I load the assembly in the main AppDomain and call
PerformCalcs()
| > the
| > | > execution time is aboput 10ms.
| > | > If I load a new AppDomain, I load the assembly using a remote
loader
| > and
| > | > then I call PerformCalcs() the execution time is aboun one minutes!!
| > |
| > | > Can anyone figure out why? The PerformCalcs has it's own objects,
so no
| > | > remoting is here!
| > |
| > | > Please Help!
| > |
| > |
| > |
|
|


Reply With Quote
  #7  
Old   
AT
 
Posts: n/a

Default Re: Performance Problem with AppDomains - 10-05-2005 , 04:46 AM



Hi Cristian,

Sorry for keep you waiting. Since I've been involved in internal certain
project, I have just managed to perform simple test. I create simple class
which has a three methods regarding on your description, like:

===================
[Serializable]
public class MyData
{
public byte[] Bytes;
}

public class MyClass : MarshalByRefObject
{
public MyClass()
{

}

public MyData TestOne()
{
MyData md = new MyData();

byte[] bytes = new byte[1024*4];
for(int i=0;i<bytes.Length;i++)
{
bytes[i] = (byte)i;
}

md.Bytes = bytes;

return md;
}


public MyData TestTwo(MyData md1)
{
MyData md = new MyData();

byte[] bytes = new byte[1024*4];
for(int i=0;i<bytes.Length;i++)
{
bytes[i] = (byte)i;
}

md.Bytes = bytes;

return md;
}

public MyData TestThree(MyData md)
{
byte[] bytes = new byte[1024*4];
for(int i=0;i<bytes.Length;i++)
{
bytes[i] = (byte)i;
}

md.Bytes = bytes;

return md;
}
}
=======================

when calling the three method locally, all of them are very fast and
consume nearly the same time span. When calling from remote (cross
appdomain), the result is also as I've expected, the "TestOne" is fastest
since it dosn't require input paramter , and Method "TestTwo" and
"TestThree" takes almost the same timespan. Also, The difference between
calling them locally and remotely dosn't like the one you mentioned (from
milliseconds to seconds).

Anyway, I've attached my test code in this message, you can have test on
your side to see whether you get the same results.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
--------------------
Quote:
Date: Tue, 04 Oct 2005 10:28:41 +0200
From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: Re: Performance Problem with AppDomains
References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD...soft (DOT) com
<c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl>
<#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl>
<#KBoBZPxFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl>
Quote:
In-Reply-To: <#KBoBZPxFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <OwVVh2LyFHA.2800 (AT) TK2MSFTNGP10 (DOT) phx.gbl
Newsgroups: microsoft.public.dotnet.framework.performance
NNTP-Posting-Host: host90-120.pool8536.interbusiness.it 85.36.120.90
Lines: 1
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3710
X-Tomcat-NG: microsoft.public.dotnet.framework.performance

Hi Steven,
do you have any news?

Thanks
Cristian Mori

Steven Cheng[MSFT] wrote:
Thanks for your detailed response.

I'll have a look and perform some tests according to the code snippets.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Date: Wed, 28 Sep 2005 10:35:35 +0200
| From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
| User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
| X-Accept-Language: en-us, en
| MIME-Version: 1.0
| Subject: Re: Performance Problem with AppDomains
| References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD...soft (DOT) com
c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| In-Reply-To: <c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| Content-Type: text/plain; charset=ISO-8859-1; format=flowed
| Content-Transfer-Encoding: 7bit
| Message-ID: <#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl
| Newsgroups: microsoft.public.dotnet.framework.performance
| NNTP-Posting-Host: host90-120.pool8536.interbusiness.it 85.36.120.90
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3700
| X-Tomcat-NG: microsoft.public.dotnet.framework.performance
|
| Hi Steven, thanks for your reply.
| The code is quite too long... I'll try to make it short to see if any
| advice is possible.
|
| I have this class
|
| [Serializable]
| public class Data
| {
| //Lot's of data.
| }
|
| I load in another appdomain an assembly. This assembly has a class
with
| this public method
|
| class MyClass
| {
| //.....
| public Data PerformCalc(Data obj)
| {
| //Do some calculation using obj
| return(obj);
| }
| }
|
| Once I tryed deriving Data from MarshallByRef, but it took far too
long
| to compute singe all read/write on the data pass through the
trasparent
| proxy.
| So I pass the Data object by value and I return it. This way I
thought
| that the only overhaead would have been the two serialize/deserialize.
| Probably I was wrong.
|
| The non AppDomain version take a very short time to compleate. We are
in
| the order of 100ms. The AppDomain version take more than 3 seconds.
|
| Even so, I still think that this is too much time since the
calculation
| is performend in a function that does not comunicate with other
AppDomains.
|
| Moreover, If I change the code this way
|
| class MyClass
| {
| //.....
| public Data PerformCalc()
| {
| Data obj=new Data();
| //Do some calculation using obj
| return(obj);
| }
| }
|
| The function is very fast!
| Moreover also this
|
| class MyClass
| {
| //.....
| public Data PerformCalc(Data obj)
| {
| //Do Nothing
| return(obj);
| }
| }
|
| if fast as well, so I think that the problem is not in the function
| itself or in the serialize/deserialize of the data but with the data
| handling itself.
| Is there any difference between doing Data obj=new Data() rather than
| receveing it from the deserialization apart the deserialization
itself?
|
| I hope that this help you understand my problem.
| If needed, I could send you a zip with the code...
| let me know please
|
| Regards
| Cristian Mori
| Steven Cheng[MSFT] wrote:
| > Hi Mori,
|
| > Welcome to MSDN newsgroup.
| > From your description, you have a certain class which has a
PerformCalcs()
| > method , you have tried load the class's assembly in .net app's
main
| > appdomain and a separated appdomain and call that class instance's
| > PerformCalcs() method. You found that when calling in separate
domain,
the
| > method will take much more time to complete, yes?
|
| > As for calling class instance remotely (cross appdomain), it'll
involve
| > many cross boundary processing, such as paramter, method
callcontext
| > marshaling/unmarshaling. These operations will all have impact on
the
| > performance. However, I also think 4 seconds still seems a bit too
long.
| > I'm not sure how you actually reference the class instance remotely
and
| > call the method, also what you've done in the method body. If
convenient,
| > I'd suggst you provide the complete code sinppet so that I can
perform
some
| > tests on my local side, at least we can confirm whether 4 seconds
is
the
| > expected time or environment specific.
|
| > Thanks,
|
| > Steven Cheng
| > Microsoft Online Support
|
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers
no
| > rights.)
|
|
|
|
| > --------------------
| > | Thread-Topic: Performance Problem with AppDomains
| > | thread-index: AcXDpS7DDnEF00gNSOCUVZ7u99lApQ==
| > | X-WBNR-Posting-Host: 81.208.74.179
| > | From: =?Utf-8?B?TW9yaUNyaXN0aWFu?= <CristianMori (AT) nospam (DOT) nospam
| > | References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
| > | Subject: RE: Performance Problem with AppDomains
| > | Date: Tue, 27 Sep 2005 13:51:07 -0700
| > | Lines: 25
| > | Message-ID: <EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD (AT) microsoft (DOT) com
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.performance
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSF TNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.performance:3698
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.performance
| > |
| > | Sorry, I had a breackoint on.
| > | So, without AppDomains, 10msec. With AppDomains 4 seconds.
| > |
| > | Please Help!
| > |
| > | Regards
| > | MoriCristian
| > |
| > | "MoriCristian" wrote:
| > |
| > | > Greetings
| > | > I'm experiencing this problem
| > |
| > | > I have a class in an assembly with a single method
PerformCalcs()
| > | > If I load the assembly in the main AppDomain and call
PerformCalcs()
| > the
| > | > execution time is aboput 10ms.
| > | > If I load a new AppDomain, I load the assembly using a remote
loader
| > and
| > | > then I call PerformCalcs() the execution time is aboun one
minutes!!
| > |
| > | > Can anyone figure out why? The PerformCalcs has it's own
objects,
so no
| > | > remoting is here!
| > |
| > | > Please Help!
| > |
| > |
| > |
|
|



Reply With Quote
  #8  
Old   
MoriCristian
 
Posts: n/a

Default Re: Performance Problem with AppDomains - 10-05-2005 , 06:02 AM



Hi Steven
First of all thanks a lot for your time.
I also performed similar testings, and I found out that the time
comsuming is the serialization of the object. It take 780 millisecond to
serialize and deserialize in the other appdomain.
The object is abount 500kbyte in size, so it's pretty big, but 780
milliseconds are also a lot of time. Since every sycle this is performed
5 times than we get 0,78*5 = 3,9 seconds. Exactly the difference in time
between the non-appdomain and appdomain version of the program.

So, now the question move to : is there a way to perform a fast
cross-domain serialization?

Thanks
Cristian

Steven Cheng[MSFT] wrote:
Quote:
Hi Cristian,

Sorry for keep you waiting. Since I've been involved in internal certain
project, I have just managed to perform simple test. I create simple class
which has a three methods regarding on your description, like:

===================
[Serializable]
public class MyData
{
public byte[] Bytes;
}

public class MyClass : MarshalByRefObject
{
public MyClass()
{

}

public MyData TestOne()
{
MyData md = new MyData();

byte[] bytes = new byte[1024*4];
for(int i=0;i<bytes.Length;i++)
{
bytes[i] = (byte)i;
}

md.Bytes = bytes;

return md;
}


public MyData TestTwo(MyData md1)
{
MyData md = new MyData();

byte[] bytes = new byte[1024*4];
for(int i=0;i<bytes.Length;i++)
{
bytes[i] = (byte)i;
}

md.Bytes = bytes;

return md;
}

public MyData TestThree(MyData md)
{
byte[] bytes = new byte[1024*4];
for(int i=0;i<bytes.Length;i++)
{
bytes[i] = (byte)i;
}

md.Bytes = bytes;

return md;
}
}
=======================

when calling the three method locally, all of them are very fast and
consume nearly the same time span. When calling from remote (cross
appdomain), the result is also as I've expected, the "TestOne" is fastest
since it dosn't require input paramter , and Method "TestTwo" and
"TestThree" takes almost the same timespan. Also, The difference between
calling them locally and remotely dosn't like the one you mentioned (from
milliseconds to seconds).

Anyway, I've attached my test code in this message, you can have test on
your side to see whether you get the same results.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
--------------------
| Date: Tue, 04 Oct 2005 10:28:41 +0200
| From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
| User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
| X-Accept-Language: en-us, en
| MIME-Version: 1.0
| Subject: Re: Performance Problem with AppDomains
| References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD...soft (DOT) com
c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl
#KBoBZPxFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| In-Reply-To: <#KBoBZPxFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| Content-Type: text/plain; charset=ISO-8859-1; format=flowed
| Content-Transfer-Encoding: 7bit
| Message-ID: <OwVVh2LyFHA.2800 (AT) TK2MSFTNGP10 (DOT) phx.gbl
| Newsgroups: microsoft.public.dotnet.framework.performance
| NNTP-Posting-Host: host90-120.pool8536.interbusiness.it 85.36.120.90
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3710
| X-Tomcat-NG: microsoft.public.dotnet.framework.performance
|
| Hi Steven,
| do you have any news?
|
| Thanks
| Cristian Mori
|
| Steven Cheng[MSFT] wrote:
| > Thanks for your detailed response.
|
| > I'll have a look and perform some tests according to the code snippets.
|
| > Steven Cheng
| > Microsoft Online Support
|
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
|
| > --------------------
| > | Date: Wed, 28 Sep 2005 10:35:35 +0200
| > | From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
| > | User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
| > | X-Accept-Language: en-us, en
| > | MIME-Version: 1.0
| > | Subject: Re: Performance Problem with AppDomains
| > | References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
| > <EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD (AT) microsoft (DOT) com
| > <c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > | In-Reply-To: <c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > | Content-Type: text/plain; charset=ISO-8859-1; format=flowed
| > | Content-Transfer-Encoding: 7bit
| > | Message-ID: <#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl
| > | Newsgroups: microsoft.public.dotnet.framework.performance
| > | NNTP-Posting-Host: host90-120.pool8536.interbusiness.it 85.36.120.90
| > | Lines: 1
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.performance:3700
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.performance
| > |
| > | Hi Steven, thanks for your reply.
| > | The code is quite too long... I'll try to make it short to see if any
| > | advice is possible.
| > |
| > | I have this class
| > |
| > | [Serializable]
| > | public class Data
| > | {
| > | //Lot's of data.
| > | }
| > |
| > | I load in another appdomain an assembly. This assembly has a class
with
| > | this public method
| > |
| > | class MyClass
| > | {
| > | //.....
| > | public Data PerformCalc(Data obj)
| > | {
| > | //Do some calculation using obj
| > | return(obj);
| > | }
| > | }
| > |
| > | Once I tryed deriving Data from MarshallByRef, but it took far too
long
| > | to compute singe all read/write on the data pass through the
trasparent
| > | proxy.
| > | So I pass the Data object by value and I return it. This way I
thought
| > | that the only overhaead would have been the two serialize/deserialize.
| > | Probably I was wrong.
| > |
| > | The non AppDomain version take a very short time to compleate. We are
in
| > | the order of 100ms. The AppDomain version take more than 3 seconds.
| > |
| > | Even so, I still think that this is too much time since the
calculation
| > | is performend in a function that does not comunicate with other
| > AppDomains.
| > |
| > | Moreover, If I change the code this way
| > |
| > | class MyClass
| > | {
| > | //.....
| > | public Data PerformCalc()
| > | {
| > | Data obj=new Data();
| > | //Do some calculation using obj
| > | return(obj);
| > | }
| > | }
| > |
| > | The function is very fast!
| > | Moreover also this
| > |
| > | class MyClass
| > | {
| > | //.....
| > | public Data PerformCalc(Data obj)
| > | {
| > | //Do Nothing
| > | return(obj);
| > | }
| > | }
| > |
| > | if fast as well, so I think that the problem is not in the function
| > | itself or in the serialize/deserialize of the data but with the data
| > | handling itself.
| > | Is there any difference between doing Data obj=new Data() rather than
| > | receveing it from the deserialization apart the deserialization
itself?
| > |
| > | I hope that this help you understand my problem.
| > | If needed, I could send you a zip with the code...
| > | let me know please
| > |
| > | Regards
| > | Cristian Mori
| > | Steven Cheng[MSFT] wrote:
| > | > Hi Mori,
| > |
| > | > Welcome to MSDN newsgroup.
| > | > From your description, you have a certain class which has a
| > PerformCalcs()
| > | > method , you have tried load the class's assembly in .net app's
main
| > | > appdomain and a separated appdomain and call that class instance's
| > | > PerformCalcs() method. You found that when calling in separate
domain,
| > the
| > | > method will take much more time to complete, yes?
| > |
| > | > As for calling class instance remotely (cross appdomain), it'll
involve
| > | > many cross boundary processing, such as paramter, method
callcontext
| > | > marshaling/unmarshaling. These operations will all have impact on
the
| > | > performance. However, I also think 4 seconds still seems a bit too
| > long.
| > | > I'm not sure how you actually reference the class instance remotely
and
| > | > call the method, also what you've done in the method body. If
| > convenient,
| > | > I'd suggst you provide the complete code sinppet so that I can
perform
| > some
| > | > tests on my local side, at least we can confirm whether 4 seconds
is
| > the
| > | > expected time or environment specific.
| > |
| > | > Thanks,
| > |
| > | > Steven Cheng
| > | > Microsoft Online Support
| > |
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > |
| > |
| > |
| > |
| > | > --------------------
| > | > | Thread-Topic: Performance Problem with AppDomains
| > | > | thread-index: AcXDpS7DDnEF00gNSOCUVZ7u99lApQ==
| > | > | X-WBNR-Posting-Host: 81.208.74.179
| > | > | From: =?Utf-8?B?TW9yaUNyaXN0aWFu?= <CristianMori (AT) nospam (DOT) nospam
| > | > | References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
| > | > | Subject: RE: Performance Problem with AppDomains
| > | > | Date: Tue, 27 Sep 2005 13:51:07 -0700
| > | > | Lines: 25
| > | > | Message-ID: <EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD (AT) microsoft (DOT) com
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain;
| > | > | charset="Utf-8"
| > | > | Content-Transfer-Encoding: 7bit
| > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | Content-Class: urn:content-classes:message
| > | > | Importance: normal
| > | > | Priority: normal
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | Newsgroups: microsoft.public.dotnet.framework.performance
| > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | > | Path:
| > TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSF TNGXA03.phx.gbl
| > | > | Xref: TK2MSFTNGXA01.phx.gbl
| > | > microsoft.public.dotnet.framework.performance:3698
| > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.performance
| > | > |
| > | > | Sorry, I had a breackoint on.
| > | > | So, without AppDomains, 10msec. With AppDomains 4 seconds.
| > | > |
| > | > | Please Help!
| > | > |
| > | > | Regards
| > | > | MoriCristian
| > | > |
| > | > | "MoriCristian" wrote:
| > | > |
| > | > | > Greetings
| > | > | > I'm experiencing this problem
| > | > |
| > | > | > I have a class in an assembly with a single method
PerformCalcs()
| > | > | > If I load the assembly in the main AppDomain and call
| > PerformCalcs()
| > | > the
| > | > | > execution time is aboput 10ms.
| > | > | > If I load a new AppDomain, I load the assembly using a remote
| > loader
| > | > and
| > | > | > then I call PerformCalcs() the execution time is aboun one
minutes!!
| > | > |
| > | > | > Can anyone figure out why? The PerformCalcs has it's own
objects,
| > so no
| > | > | > remoting is here!
| > | > |
| > | > | > Please Help!
| > | > |
| > | > |
| > | > |
| > |
| > |
|
|

Reply With Quote
  #9  
Old   
AT
 
Posts: n/a

Default Re: Performance Problem with AppDomains - 10-06-2005 , 04:30 AM



Thanks for your followup Cristian,

So since you mentioned that your actual class will hold about 500kb data,
I'm afraid this is really a big pressure for cross appdomain communication.
Also, for class that apply the [Serializable] attribute, the .net
framework automatically determine the runtime serialize structure, we
haven't any particular means to improve it. If your data's structure or
members is of particular type which can be compressed, you can consider
manually implement the ISerializable interface for your class.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security



--------------------
Quote:
Date: Wed, 05 Oct 2005 12:02:50 +0200
From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: Re: Performance Problem with AppDomains
References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD...soft (DOT) com
<c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl>
<#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl>
<#KBoBZPxFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl>
<OwVVh2LyFHA.2800 (AT) TK2MSFTNGP10 (DOT) phx.gbl>
<VnJkalYyFHA.3020 (AT) TK2MSFTNGXA01 (DOT) phx.gbl>
Quote:
In-Reply-To: <VnJkalYyFHA.3020 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <uACqyPZyFHA.788 (AT) tk2msftngp13 (DOT) phx.gbl
Newsgroups: microsoft.public.dotnet.framework.performance
NNTP-Posting-Host: host90-120.pool8536.interbusiness.it 85.36.120.90
Lines: 1
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3726
X-Tomcat-NG: microsoft.public.dotnet.framework.performance

Hi Steven
First of all thanks a lot for your time.
I also performed similar testings, and I found out that the time
comsuming is the serialization of the object. It take 780 millisecond to
serialize and deserialize in the other appdomain.
The object is abount 500kbyte in size, so it's pretty big, but 780
milliseconds are also a lot of time. Since every sycle this is performed
5 times than we get 0,78*5 = 3,9 seconds. Exactly the difference in time
between the non-appdomain and appdomain version of the program.

So, now the question move to : is there a way to perform a fast
cross-domain serialization?

Thanks
Cristian

Steven Cheng[MSFT] wrote:
Hi Cristian,

Sorry for keep you waiting. Since I've been involved in internal
certain
project, I have just managed to perform simple test. I create simple
class
which has a three methods regarding on your description, like:

===================
[Serializable]
public class MyData
{
public byte[] Bytes;
}

public class MyClass : MarshalByRefObject
{
public MyClass()
{

}

public MyData TestOne()
{
MyData md = new MyData();

byte[] bytes = new byte[1024*4];
for(int i=0;i<bytes.Length;i++)
{
bytes[i] = (byte)i;
}

md.Bytes = bytes;

return md;
}


public MyData TestTwo(MyData md1)
{
MyData md = new MyData();

byte[] bytes = new byte[1024*4];
for(int i=0;i<bytes.Length;i++)
{
bytes[i] = (byte)i;
}

md.Bytes = bytes;

return md;
}

public MyData TestThree(MyData md)
{
byte[] bytes = new byte[1024*4];
for(int i=0;i<bytes.Length;i++)
{
bytes[i] = (byte)i;
}

md.Bytes = bytes;

return md;
}
}
=======================

when calling the three method locally, all of them are very fast and
consume nearly the same time span. When calling from remote (cross
appdomain), the result is also as I've expected, the "TestOne" is
fastest
since it dosn't require input paramter , and Method "TestTwo" and
"TestThree" takes almost the same timespan. Also, The difference
between
calling them locally and remotely dosn't like the one you mentioned
(from
milliseconds to seconds).

Anyway, I've attached my test code in this message, you can have test
on
your side to see whether you get the same results.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
--------------------
| Date: Tue, 04 Oct 2005 10:28:41 +0200
| From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
| User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
| X-Accept-Language: en-us, en
| MIME-Version: 1.0
| Subject: Re: Performance Problem with AppDomains
| References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD...soft (DOT) com
c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl
#KBoBZPxFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| In-Reply-To: <#KBoBZPxFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| Content-Type: text/plain; charset=ISO-8859-1; format=flowed
| Content-Transfer-Encoding: 7bit
| Message-ID: <OwVVh2LyFHA.2800 (AT) TK2MSFTNGP10 (DOT) phx.gbl
| Newsgroups: microsoft.public.dotnet.framework.performance
| NNTP-Posting-Host: host90-120.pool8536.interbusiness.it 85.36.120.90
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3710
| X-Tomcat-NG: microsoft.public.dotnet.framework.performance
|
| Hi Steven,
| do you have any news?
|
| Thanks
| Cristian Mori
|
| Steven Cheng[MSFT] wrote:
| > Thanks for your detailed response.
|
| > I'll have a look and perform some tests according to the code
snippets.
|
| > Steven Cheng
| > Microsoft Online Support
|
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers
no
| > rights.)
|
| > --------------------
| > | Date: Wed, 28 Sep 2005 10:35:35 +0200
| > | From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
| > | User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
| > | X-Accept-Language: en-us, en
| > | MIME-Version: 1.0
| > | Subject: Re: Performance Problem with AppDomains
| > | References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
| > <EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD (AT) microsoft (DOT) com
| > <c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > | In-Reply-To: <c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > | Content-Type: text/plain; charset=ISO-8859-1; format=flowed
| > | Content-Transfer-Encoding: 7bit
| > | Message-ID: <#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl
| > | Newsgroups: microsoft.public.dotnet.framework.performance
| > | NNTP-Posting-Host: host90-120.pool8536.interbusiness.it
85.36.120.90
| > | Lines: 1
| > | Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.performance:3700
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.performance
| > |
| > | Hi Steven, thanks for your reply.
| > | The code is quite too long... I'll try to make it short to see if
any
| > | advice is possible.
| > |
| > | I have this class
| > |
| > | [Serializable]
| > | public class Data
| > | {
| > | //Lot's of data.
| > | }
| > |
| > | I load in another appdomain an assembly. This assembly has a
class
with
| > | this public method
| > |
| > | class MyClass
| > | {
| > | //.....
| > | public Data PerformCalc(Data obj)
| > | {
| > | //Do some calculation using obj
| > | return(obj);
| > | }
| > | }
| > |
| > | Once I tryed deriving Data from MarshallByRef, but it took far
too
long
| > | to compute singe all read/write on the data pass through the
trasparent
| > | proxy.
| > | So I pass the Data object by value and I return it. This way I
thought
| > | that the only overhaead would have been the two
serialize/deserialize.
| > | Probably I was wrong.
| > |
| > | The non AppDomain version take a very short time to compleate. We
are
in
| > | the order of 100ms. The AppDomain version take more than 3
seconds.
| > |
| > | Even so, I still think that this is too much time since the
calculation
| > | is performend in a function that does not comunicate with other
| > AppDomains.
| > |
| > | Moreover, If I change the code this way
| > |
| > | class MyClass
| > | {
| > | //.....
| > | public Data PerformCalc()
| > | {
| > | Data obj=new Data();
| > | //Do some calculation using obj
| > | return(obj);
| > | }
| > | }
| > |
| > | The function is very fast!
| > | Moreover also this
| > |
| > | class MyClass
| > | {
| > | //.....
| > | public Data PerformCalc(Data obj)
| > | {
| > | //Do Nothing
| > | return(obj);
| > | }
| > | }
| > |
| > | if fast as well, so I think that the problem is not in the
function
| > | itself or in the serialize/deserialize of the data but with the
data
| > | handling itself.
| > | Is there any difference between doing Data obj=new Data() rather
than
| > | receveing it from the deserialization apart the deserialization
itself?
| > |
| > | I hope that this help you understand my problem.
| > | If needed, I could send you a zip with the code...
| > | let me know please
| > |
| > | Regards
| > | Cristian Mori
| > | Steven Cheng[MSFT] wrote:
| > | > Hi Mori,
| > |
| > | > Welcome to MSDN newsgroup.
| > | > From your description, you have a certain class which has a
| > PerformCalcs()
| > | > method , you have tried load the class's assembly in .net app's
main
| > | > appdomain and a separated appdomain and call that class
instance's
| > | > PerformCalcs() method. You found that when calling in separate
domain,
| > the
| > | > method will take much more time to complete, yes?
| > |
| > | > As for calling class instance remotely (cross appdomain), it'll
involve
| > | > many cross boundary processing, such as paramter, method
callcontext
| > | > marshaling/unmarshaling. These operations will all have impact
on
the
| > | > performance. However, I also think 4 seconds still seems a bit
too
| > long.
| > | > I'm not sure how you actually reference the class instance
remotely
and
| > | > call the method, also what you've done in the method body. If
| > convenient,
| > | > I'd suggst you provide the complete code sinppet so that I can
perform
| > some
| > | > tests on my local side, at least we can confirm whether 4
seconds
is
| > the
| > | > expected time or environment specific.
| > |
| > | > Thanks,
| > |
| > | > Steven Cheng
| > | > Microsoft Online Support
| > |
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and
confers
no
| > | > rights.)
| > |
| > |
| > |
| > |
| > | > --------------------
| > | > | Thread-Topic: Performance Problem with AppDomains
| > | > | thread-index: AcXDpS7DDnEF00gNSOCUVZ7u99lApQ==
| > | > | X-WBNR-Posting-Host: 81.208.74.179
| > | > | From: =?Utf-8?B?TW9yaUNyaXN0aWFu?=
CristianMori (AT) nospam (DOT) nospam
| > | > | References:
25E92219-89DA-4229-8ECB-8738E2522C32...soft (DOT) com
| > | > | Subject: RE: Performance Problem with AppDomains
| > | > | Date: Tue, 27 Sep 2005 13:51:07 -0700
| > | > | Lines: 25
| > | > | Message-ID:
EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD...soft (DOT) com
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain;
| > | > | charset="Utf-8"
| > | > | Content-Transfer-Encoding: 7bit
| > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | Content-Class: urn:content-classes:message
| > | > | Importance: normal
| > | > | Priority: normal
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | Newsgroups: microsoft.public.dotnet.framework.performance
| > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | > | Path:
| > TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSF TNGXA03.phx.gbl
| > | > | Xref: TK2MSFTNGXA01.phx.gbl
| > | > microsoft.public.dotnet.framework.performance:3698
| > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.performance
| > | > |
| > | > | Sorry, I had a breackoint on.
| > | > | So, without AppDomains, 10msec. With AppDomains 4 seconds.
| > | > |
| > | > | Please Help!
| > | > |
| > | > | Regards
| > | > | MoriCristian
| > | > |
| > | > | "MoriCristian" wrote:
| > | > |
| > | > | > Greetings
| > | > | > I'm experiencing this problem
| > | > |
| > | > | > I have a class in an assembly with a single method
PerformCalcs()
| > | > | > If I load the assembly in the main AppDomain and call
| > PerformCalcs()
| > | > the
| > | > | > execution time is aboput 10ms.
| > | > | > If I load a new AppDomain, I load the assembly using a
remote
| > loader
| > | > and
| > | > | > then I call PerformCalcs() the execution time is aboun one
minutes!!
| > | > |
| > | > | > Can anyone figure out why? The PerformCalcs has it's own
objects,
| > so no
| > | > | > remoting is here!
| > | > |
| > | > | > Please Help!
| > | > |
| > | > |
| > | > |
| > |
| > |
|
|



Reply With Quote
  #10  
Old   
MoriCristian
 
Posts: n/a

Default Re: Performance Problem with AppDomains - 10-07-2005 , 10:03 AM



Hi steven.
Yeah, your advice proven to be precious.
I'm trying to implement my own ISerializable using compression, but I found
a problem

Implementing the GetObjectData, it would be usefull to get a byte array
rappresenting the class, and Isually do so using this code

System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter formatter
= new System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter();
formatter.Serialize(buffer, this);
Byte[] ByteObject=new Byte[buffer.Length];
buffer.Read(ByteObject,0,buffer.Length]

however, since I'm implementing my own ISerializable I cannot call
formatter.Serializable since it would end up in a mess.

Could you give me any other advice?

Thanks
Cristian Mori

implementing the GlobalObjec

"Steven Cheng[MSFT]" wrote:

Quote:
Thanks for your followup Cristian,

So since you mentioned that your actual class will hold about 500kb data,
I'm afraid this is really a big pressure for cross appdomain communication.
Also, for class that apply the [Serializable] attribute, the .net
framework automatically determine the runtime serialize structure, we
haven't any particular means to improve it. If your data's structure or
members is of particular type which can be compressed, you can consider
manually implement the ISerializable interface for your class.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security



--------------------
| Date: Wed, 05 Oct 2005 12:02:50 +0200
| From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
| User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
| X-Accept-Language: en-us, en
| MIME-Version: 1.0
| Subject: Re: Performance Problem with AppDomains
| References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD...soft (DOT) com
c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl
#KBoBZPxFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
OwVVh2LyFHA.2800 (AT) TK2MSFTNGP10 (DOT) phx.gbl
VnJkalYyFHA.3020 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| In-Reply-To: <VnJkalYyFHA.3020 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| Content-Type: text/plain; charset=ISO-8859-1; format=flowed
| Content-Transfer-Encoding: 7bit
| Message-ID: <uACqyPZyFHA.788 (AT) tk2msftngp13 (DOT) phx.gbl
| Newsgroups: microsoft.public.dotnet.framework.performance
| NNTP-Posting-Host: host90-120.pool8536.interbusiness.it 85.36.120.90
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3726
| X-Tomcat-NG: microsoft.public.dotnet.framework.performance
|
| Hi Steven
| First of all thanks a lot for your time.
| I also performed similar testings, and I found out that the time
| comsuming is the serialization of the object. It take 780 millisecond to
| serialize and deserialize in the other appdomain.
| The object is abount 500kbyte in size, so it's pretty big, but 780
| milliseconds are also a lot of time. Since every sycle this is performed
| 5 times than we get 0,78*5 = 3,9 seconds. Exactly the difference in time
| between the non-appdomain and appdomain version of the program.
|
| So, now the question move to : is there a way to perform a fast
| cross-domain serialization?
|
| Thanks
| Cristian
|
| Steven Cheng[MSFT] wrote:
| > Hi Cristian,
|
| > Sorry for keep you waiting. Since I've been involved in internal
certain
| > project, I have just managed to perform simple test. I create simple
class
| > which has a three methods regarding on your description, like:
|
| > ===================
| > [Serializable]
| > public class MyData
| > {
| > public byte[] Bytes;
| > }
|
| > public class MyClass : MarshalByRefObject
| > {
| > public MyClass()
| > {
|
| > }
|
| > public MyData TestOne()
| > {
| > MyData md = new MyData();
|
| > byte[] bytes = new byte[1024*4];
| > for(int i=0;i<bytes.Length;i++)
| > {
| > bytes[i] = (byte)i;
| > }
|
| > md.Bytes = bytes;
|
| > return md;
| > }
|
|
| > public MyData TestTwo(MyData md1)
| > {
| > MyData md = new MyData();
|
| > byte[] bytes = new byte[1024*4];
| > for(int i=0;i<bytes.Length;i++)
| > {
| > bytes[i] = (byte)i;
| > }
|
| > md.Bytes = bytes;
|
| > return md;
| > }
|
| > public MyData TestThree(MyData md)
| > {
| > byte[] bytes = new byte[1024*4];
| > for(int i=0;i<bytes.Length;i++)
| > {
| > bytes[i] = (byte)i;
| > }
|
| > md.Bytes = bytes;
|
| > return md;
| > }
| > }
| > =======================
|
| > when calling the three method locally, all of them are very fast and
| > consume nearly the same time span. When calling from remote (cross
| > appdomain), the result is also as I've expected, the "TestOne" is
fastest
| > since it dosn't require input paramter , and Method "TestTwo" and
| > "TestThree" takes almost the same timespan. Also, The difference
between
| > calling them locally and remotely dosn't like the one you mentioned
(from
| > milliseconds to seconds).
|
| > Anyway, I've attached my test code in this message, you can have test
on
| > your side to see whether you get the same results.
|
| > Thanks,
|
| > Steven Cheng
| > Microsoft Online Support
|
| > Get Secure! www.microsoft.com/security
| > --------------------
| > | Date: Tue, 04 Oct 2005 10:28:41 +0200
| > | From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
| > | User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
| > | X-Accept-Language: en-us, en
| > | MIME-Version: 1.0
| > | Subject: Re: Performance Problem with AppDomains
| > | References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
| > <EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD (AT) microsoft (DOT) com
| > <c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > <#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl
| > <#KBoBZPxFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > | In-Reply-To: <#KBoBZPxFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > | Content-Type: text/plain; charset=ISO-8859-1; format=flowed
| > | Content-Transfer-Encoding: 7bit
| > | Message-ID: <OwVVh2LyFHA.2800 (AT) TK2MSFTNGP10 (DOT) phx.gbl
| > | Newsgroups: microsoft.public.dotnet.framework.performance
| > | NNTP-Posting-Host: host90-120.pool8536.interbusiness.it 85.36.120.90
| > | Lines: 1
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.performance:3710
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.performance
| > |
| > | Hi Steven,
| > | do you have any news?
| > |
| > | Thanks
| > | Cristian Mori
| > |
| > | Steven Cheng[MSFT] wrote:
| > | > Thanks for your detailed response.
| > |
| > | > I'll have a look and perform some tests according to the code
snippets.
| > |
| > | > Steven Cheng
| > | > Microsoft Online Support
| > |
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > |
| > | > --------------------
| > | > | Date: Wed, 28 Sep 2005 10:35:35 +0200
| > | > | From: MoriCristian <CristianMori (AT) nospam (DOT) nospam
| > | > | User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
| > | > | X-Accept-Language: en-us, en
| > | > | MIME-Version: 1.0
| > | > | Subject: Re: Performance Problem with AppDomains
| > | > | References: <25E92219-89DA-4229-8ECB-8738E2522C32 (AT) microsoft (DOT) com
| > | > <EC9C7082-9610-4BF2-9EEC-4CF5B2287EBD (AT) microsoft (DOT) com
| > | > <c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > | > | In-Reply-To: <c#HOgw$wFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > | > | Content-Type: text/plain; charset=ISO-8859-1; format=flowed
| > | > | Content-Transfer-Encoding: 7bit
| > | > | Message-ID: <#tO6MeAxFHA.3300 (AT) TK2MSFTNGP09 (DOT) phx.gbl
| > | > | Newsgroups: microsoft.public.dotnet.framework.performance
| > | > | NNTP-Posting-Host: host90-120.pool8536.interbusiness.it
85.36.120.90
| > | > | Lines: 1
| > | > | Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| > | > | Xref: TK2MSFTNGXA01.phx.gbl
| > | > microsoft.public.dotnet.framework.performance:3700
| > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.performance
| > | > |
| > | > | Hi Steven, thanks for your reply.
| > | > | The code is quite too long... I'll try to make it short to see if
any
| > | > | advice is possible.
| > | > |
| > | > | I have this class
| > | > |
| > | > | [Serializable]
| > | > | public class Data
| > | > | {
| > | > | //Lot's of data.
| > | > | }
| > | > |
| > | > | I load in another appdomain an assembly. This assembly has a
class
| > with
| > | > | this public method
| > | > |
| > | > | class MyClass
| > | > | {
| > | > | //.....
| > | > | public Data PerformCalc(Data obj)
| > | > | {
| > | > | //Do some calculation using obj
| > | > | return(obj);
| > | > | }
| > | > | }
| > | > |
| > | > | Once I tryed deriving Data from MarshallByRef, but it took far
too
| > long
| > | > | to compute singe all read/write on the data pass through the
| > trasparent
| > | > | proxy.
| > | > | So I pass the Data object by value and I return it. This way I
| > thought
| > | > | that the only overhaead would have been the two
serialize/deserialize.
| > | > | Probably I was wrong.
| > | > |
| > | > | The non AppDomain version take a very short time to compleate. We
are
| > in
| > | > | the order of 100ms. The AppDomain version take more than 3
seconds.
| > | > |
| > | > | Even so, I still think that this is too much time since the
| > calculation
| > | > | is performend in a function that does not comunicate with other
| > | > AppDomains.
| > | > |
| > | > | Moreover, If I change the code this way
| > | > |
| > | > | class MyClass
| > | > | {
| > | > | //.....
| > | > | public Data PerformCalc()
| > | > | {
| > | > | Data obj=new Data();
| > | > | //Do some calculation using obj
| > | > | return(obj);
| > | > | }
| > | > | }
| > | > |
| > | > | The function is very fast!
| > | > | Moreover also this
| > | > |
| > | > | class MyClass
| > | > | {
| > | > | //.....
| > | > | public Data PerformCalc(Data obj)
| > | > | {
| > | > | //Do Nothing
| > | > | return(obj);
| > | > | }
| > | > | }
| > | > |
| > | > | if fast as well, so I think that the problem is not in the
function
| > | > | itself or in the serialize/deserialize of the data but with the
data

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.