Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have migrated an VB. 6.0 application into vb.net 3.5 window application using an tool called ArtinSoft.

Neither have I re-architected it nor optimized the codebase.
I have made as least as possible changes just to make the application run properly.

Now I am facing the performance issues.

Performance of the Vb.net application is much slower from VB 6.0 application so our client is not ready to accept it.
Now I need to optimize the codebase and may be I can re-architect it up to an certain level.
Please help me on what are the things I need to optimize when we do this type of migration using an tool?
This is first time I did so.

Please help me if someone has already done this type of migration project or similar activity.


Thanks

Akash Agarwal
Posted
Updated 1-Jun-11 21:35pm
v2
Comments
cuteband 1-Jun-11 21:32pm    
I advise to create all your conditions in Store Procedure. This is lots of works but im sure this will make the system faster.
Dalek Dave 2-Jun-11 3:35am    
Edited for Grammar, Spelling and Readability.

1 solution

I haven't migrated an application like you did (always rewrote the application), but this is what I would do / consider:

- rewrite code that is really slow

- use .NET framework. Write code that can replace external components or wrappers. (Like SerialPort instead of some rs232 class).

- use BackGroundWorker for time consuming actions.
http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker(v=VS.90).aspx[^]

- use a splash screen at startup and other visual effects like hourglass, progressbar, clock or anything that shows the user that the application is busy.

- place the assembly in the Global Assembly Cache (GAC). I wouldn't recommend it, but it is something to consider.
http://msdn.microsoft.com/en-us/library/ex0ss12c(v=VS.90).aspx[^]
http://social.msdn.microsoft.com/Forums/en-US/clr/thread/7a6d0d3e-24b5-4f0a-ac59-b7bb0e1c4611/[^]

- how are you connecting to the database?

- and like cuteband advised: use stored procedures

I hope this gives you some ideas and options.
 
Share this answer
 
Comments
Akash Agarwal 2-Jun-11 3:00am    
Thanks Ruard!
one thing I have observed in the application is that they are using many functions of windows kernal dll's which I do not understand much. Second thing is, for state management, application is using Global variable like anything in almost all the Win Forms so there is very less or no decoupling between component and the result is that , I am finding it very difficult to implement multithreading. Planning to replace Global variables with Singletone class. They are using ini file to maintain some flags. I am planning to put an app.config file instead of ini file. If you can share your thoughts on the above point than it would be great.
[no name] 2-Jun-11 4:05am    
Take a look at this article (Persist User Settings in Visual Basic) on how to save settings.

http://msdn.microsoft.com/en-us/library/fwc80dzb(v=vs.80).aspx
[no name] 2-Jun-11 4:07am    
You can probably replace a lot of these functions with .NET code. Make a list and use the object browser in .NET or Google to find the .NET equivalent. Like "Sleep" is now available in System.Threading.Thread.Sleep
[no name] 2-Jun-11 4:13am    
About variables:
1) try to narrow the scope. What I sometimes do is just make everything private and learn from the compiler errors.
2) use option strict on, option explicit on. This also helps a lot
3) consider using properties for global variables (so make the variable private and add a public property. Then you can add an entry to a log or so when a value is set. This may give you more information on the variable.
Dalek Dave 2-Jun-11 3:35am    
Good Answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900