Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Winsock: VB.NET slower than VB 6 ?

Posted on 2004-09-29
6
Medium Priority
?
448 Views
Last Modified: 2010-05-18
Hello thanks for reading my post

I wrote a program utilizing Winsock in VB 6 a while back.  I recently got VB.net and am rewriting the program (not using the conversion tool; I'm doing it line by line).

I would think the VB.net program SHOULD be running faster...  a) its a newer version of VB & b) ive made several code improvements.  However, the client program (written in VB 6 still) takes a MUCH longer time to process incoming Winsock information than it did with the VB 6 version.

Has anything like this happened to anyone else?  Is it a compatibility issue perhaps?  Anything I can do to fix it?

Thanks for any advice you can give me!

Michael
0
Comment
Question by:michaelman
  • 3
  • 3
6 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12200355
How are you accessing Winsock?  Is is through COM interoperability?  Do you have "chatty" calls?  

COM Interoperability adds considerable overhead to your solution (if you that's what you are using).

Bob
0
 

Author Comment

by:michaelman
ID: 12202842
Thanks for the response.

I actually had trouble setting up the Winsock myself...      I found it was not like VB 6 where I could just drag a Winsock icon onto the form.  To get around this problem, I created a project containing just the Winsock control and used the conversion tool.

Can you explain what you mean by "chatty" calls?

Also, thanks for the tip on the overhead.  I recently discovered an article about alternatives to Winsock.  Havn't really had time to look at it in depth though.

Michael
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 200 total points
ID: 12202872
A "chatty" call, through Interoperability, is where you set a lot of properties one at a time, instead of all at once.  It depends on the implementation of the library, and how you access it.  The is overhead to making COM calls, so you want to keep them to a minimum (or chunking).

What are you trying to accomplish with Winsock?  It might be easily done with System.Net.

Bob
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:michaelman
ID: 12205118
Its pretty much an online game.  The client connects to the server, and the server uses winsock to send it commands like:  display this image at this coordinate...   display this text...  I try very hard to accomplish as much as I can with as little data transfer as possible.

Also, system.net was the topic of the article I mentioned in my previous post.  It would be great if you could comment on it.

Thanks

Michael
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12219521
Would you like to find alternatives from System.Net and sockets?  It is possible.

Bob
0
 

Author Comment

by:michaelman
ID: 12219609
Yeah, I'll go ahead and start looking on the net.

0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Integration Management Part 2
Screencast - Getting to Know the Pipeline

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question