Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Speed Issues

Status
Not open for further replies.

fruityBoy

Programmer
Jul 21, 2000
51
GB
Hi
I was wondering if anybody had come across this before:

I have a transaction setup in MTS (components written in visual foxpro), and call a method of one of the components which kicks it all off.

I have found however, that if I call a DCOM exe (on the server) from my client, which in turn calls the MTS component the transaction is approx 200% faster, so, using a 'middle man', so to speak, actually improves speed over calling the components in MTS directly.

I think that it will be to do with marshalling the objects across the network to the local machine that is slowing down the direct connection to MTS, the middleman object only has to talk to a process on the same machine.

Has anybody else encountered this?

Thanks
fruityBoy
 
Are you marshalling objects across the wire?!? If so, stop! That will kill your performance faster then anything else you can do (the only possible exception would be disconnected ADO recordsets). Also if you are trying to mashal objects across domains you will start getting permission denied erroers due to the callbacks.
All of your data sould be passed across process bounderies and networks as simple variables (integer, string, bytes) and not complex objects. Look at passing XML, contents of property bags, or create your own marshaller (I've done this . . . its not as bad as it sounds).
- Jeff Marler B-)
 
Hiya Jeff,
What I am doing is instantiating the object using createobject('mydll.myclass'), and then passing information to the object (which is contained in MTS).

Using the object this way is very fast sending and receiving disconnected recordsets, however, it is only when calling a method which instantiates and controls a transaction that I get a severe performance hit (waiting 10 seconds for a simple 3 table update).

This is true for both MTS running on NT Server 4.0, and for MTS for win 9.x which I have on my development machine.

It's somthing to do with the way the transaction is being handled.

Thanks for your help

 
Don't forget that MTS/COM+ will pool connections and instances. So the speed increase you're seeing is probably the time saved from the actual creation of the object (which MTS has already done for you).

Chip H.
 
What is the DCOM object written in ?

Maybe is shows that Vis Fox does not work so well with connection pooling components in MTS, but can communicate well with the DCOM object.

Although the fact about communicating with the threads over the network slowing stuff down as opposed to the DCOM object
communicating on the same machine tends to make sense.

I still dont trust Fox. Also note that Fox will not work well with automated testing tools, because fox does not have true windows, it is real tricky.

Matthew Humphrey
 
Hiya Guys, just wanted to say a big thnx for all your help.
I have a confession to make..I tracked down the cause of the slow down, I wrote some testing programs to initiate transactions, etc, but I found that my object was going out of scope, and it was the releasing of the reference to the remote object that was taking the time.

The initial connection (and the actual transaction ;) ) is fast, just releasing the object is slow.

I hereby offer my sincere apologies for wasting all of your time, and if you knew where I lived I would not blame you for comming around and giving me a black eye.

Regards
fruityBoy
 
No problem -

Sometimes you just need another set of eyes on a problem.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top