Author Topic: Slow Execution in Windows 7 64-bit  (Read 8498 times)

Offline Killface

  • Single posting newcomer
  • *
  • Posts: 3
Slow Execution in Windows 7 64-bit
« on: April 30, 2012, 05:18:26 pm »
Sorry, for being a bit of a newb when it comes to programming.  I've been working towards learning c++ and programming in general on my own with CodeBlocks, and it's been pretty fun so far.

But recently I find myself with an issue in Codeblocks 10.05, where the code seems to run exponentially slower on a Windows 7 64-bit machine, as opposed to the blazing fast execution on an half decade old 32-bit WinXP machine.  For example the XP Machine will fully execute the code to completion in 15-20 seconds, whereas the Win 7 Machine might take upwards of 225 seconds.

I'm not really sure how to improve the performance.  I did try to use one of the more recent 'nightlies'.  Strangely enough, it ran pretty fast on the Win 7 machine at first, but then slowed to the usual crawl, and never repeated the fast start again on subsequent runs.

Any help would be appreciated.


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Slow Execution in Windows 7 64-bit
« Reply #1 on: April 30, 2012, 05:43:16 pm »
I suggest posting the Compiler name and version.

You might try turning off virus scanner and other software to see it it makes a difference.

NOTE: Code::Blocks is an Editor/IDE not a Compiler.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Slow Execution in Windows 7 64-bit
« Reply #2 on: April 30, 2012, 05:43:39 pm »
If the code you've developed runs slower than this is not related to Code::Blocks, but to the compiler you are using. Try different optimisation level, for example and see, if that changes things. Alternatively you can try a more recent compiler, probably, but anyways you should better ask in a forum dedicated to the compiler you are using. C::B is just a front-end to the compiler so what the compiler does out of your code is not within the scope of C::B.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Killface

  • Single posting newcomer
  • *
  • Posts: 3
Re: Slow Execution in Windows 7 64-bit
« Reply #3 on: April 30, 2012, 06:08:56 pm »
I'm using: tdm-mingw-1.908.0-4.4.1-2

C++ Compiler: mingw32-g++.exe

This might be a dumb question, but should I be using a 64-bit Compiler instead? 

Right now I'm just trying to teach myself, so I'm not worried about producing code for a particular system.






Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Slow Execution in Windows 7 64-bit
« Reply #4 on: May 01, 2012, 10:37:00 am »
I'm using: tdm-mingw-1.908.0-4.4.1-2
...try a more recent one. I recall that this compiler even had weird problems under Windows7 (But I might be wrong!).

This might be a dumb question, but should I be using a 64-bit Compiler instead? 
Depends on if you want native 64 bit code (which would not run on 32 bit platforms). It also depends whether any (3rd party) libs you are using support 64 bit, too. Its up to you to take that design decision. There is nothing wrong with a 32 bit compiler under 64 bit Windows. And if you also target 32 bit platforms you'll certainly have to use a 32 bit compiler.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

metalivana

  • Guest
Re: Slow Execution in Windows 7 64-bit
« Reply #5 on: May 06, 2012, 03:47:05 pm »
hello everyone  ;D,

I had the same problem and I solve it (and I have too windows 7 64-bits),
maybe its the anti-virus, deactivate it and retry to compile.
if its work, you may manage exclusions in your anti-virus and allow codeblocks.exe and his process children to run freely.

I hope that will help you,
and sorry if my english was bad ::).

Offline Killface

  • Single posting newcomer
  • *
  • Posts: 3
Re: Slow Execution in Windows 7 64-bit
« Reply #6 on: May 07, 2012, 12:49:31 am »
Sorry for the delay in getting back to you guys on this.  I finally got a chance to sit down and really try what's been suggested.

Unfortunately, it appears the issue all along was the flash drive or rather how Windows 7 64-bit (or perhaps something else on the machine) was handling the reading/writing of the project files off the drive.  For some reason it's almost blazing fast on a WinXP 32-bit machine from the middle of last decade, but horrifically slow on the Win 7 machine.

It only took me hours to figure this out today.

Anyway, thanks for the help everyone!