Solved

Winsock: VB.NET slower than VB 6 ?

Posted on 2004-09-29
6
433 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 50 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
Industry Leaders: 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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