locked
VS2008 takes long time on our Windows 8 x64 bit machine RRS feed

  • Question

  • Hi,

    I have VS2008 on a Windows 8 64 bit machine.
    The project(Windows 32) was upgraded from framework 1.1 to framework 3.5.
    But the project runs very slow, compared to that VS2008 project running on a Windows Xp x32 bit mahcine.  For a particular windows form with lots of windows controls and accesseing to database many times, it takes approximately 6 seconds, but on Windows xp it only takes less than a second. 
    How do I solve this problem?
    Thanks for help.

    Jason

    Wednesday, January 8, 2014 12:46 AM

Answers

  • I can't imagine why that would be. Are you sure that its the same code? The only difference is the platform/framework version? If so, check to make sure that the network connections are the same speed. If that doesn't help you narrow in on the problem, write a simple program that executes a single database query and try it on both machines with their respective frameworks. If you can get exact times on each one, I may be able to provide more help. If you can give me the exact program that you use and their times, I may be able to verify the test. If it actually demonstrates slower performance on the newer platform you might be able to file a bug report (it might be worth it to try 4.5 on Windows 8 to compare).

    Wasabi Fan

    • Marked as answer by Eason_H Thursday, January 16, 2014 8:45 AM
    Wednesday, January 8, 2014 6:44 AM

All replies

  • Although I can't speak for specific cases, I think that in general newer frameworks will run faster on newer machines. The older frameworks haven't been optimized for newer versions of Windows, and frankly you're pretty lucky that even the 3.5 framework with VS 2008 is compatible with Windows 8.

    Really, if you have restrictions on framework and Visual Studio (Can't use VS 2013 and .NET 4.5 instead), all you can do is optimize your code. If the issue is clearly OS-related, it's at the level that you can't control.

    I would recommend going through your code and speeding it up in any way possible. Find what's being slow (database calls? Form controls?) and then try to speed that up by consolidating DB calls, disposing of objects that you are done with, etc.. You can also try turning on compiler optimizations if they aren't on already.

    If you can upgrade to the newest framework and VS version, I think you could greatly improve the speed. Here's one example of the .NET 4.5 framework's speed improvements: http://stackoverflow.com/questions/12468267/unexpected-speed-up-on-net-framework-4-5


    Wasabi Fan

    Wednesday, January 8, 2014 2:13 AM
  • It's the database calls.
    I compare the vs2008+Winxpx32 withe vs2008+Win8x64, both in bebug mode.
    At the SqlDataAdapter.Fill(), the WinXp goes smoothly, but the Win8x64 has a short break and turn to the background main program then back to the next line of the .Fill();
    Wednesday, January 8, 2014 6:15 AM
  • I can't imagine why that would be. Are you sure that its the same code? The only difference is the platform/framework version? If so, check to make sure that the network connections are the same speed. If that doesn't help you narrow in on the problem, write a simple program that executes a single database query and try it on both machines with their respective frameworks. If you can get exact times on each one, I may be able to provide more help. If you can give me the exact program that you use and their times, I may be able to verify the test. If it actually demonstrates slower performance on the newer platform you might be able to file a bug report (it might be worth it to try 4.5 on Windows 8 to compare).

    Wasabi Fan

    • Marked as answer by Eason_H Thursday, January 16, 2014 8:45 AM
    Wednesday, January 8, 2014 6:44 AM
  • Thanks!
    The WinXp x32 machine and the Win8x64 machine are well plugged to same network switch.  I tested the lan network speed by copying an 1.45GB folder from our NAS to both machines, they both used about 3 minutes.  So, the LAN/NIC connection should be fine.
    Using the same program codes, while executing the SqlDataAdapter.Fill(), there's a tiny time break compared to executing the SqlDataAdapter.Fill() on the WinXp x32 machine.   
    On the Win8x64, it won't take long for retrieving a single .Fill() action, even it return many rows of data, but in a C# windows form requiring retrieving some small data many times, it spend several seconds.  I have disabled the framework 4.5 feauture already.
    Wednesday, January 8, 2014 8:21 AM
  • I put DateTime variables right before and after the .Fill() method, and then calculated the timespan for each .Fill() method.
    The time spent for .Fill()  in WinXP32+VS2008 is about 16 total milliseconds, while in Win8x64+VS2008 it has to take approximately 500 total milliseconds.
    Thursday, January 9, 2014 2:57 AM