• 15
• 15
• 11
• 9
• 10

# Super slow compiling?

This topic is 1774 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi!

Since a few days ago I've been experiencing some extreme slow compile on Visual C++. I think that even when I try to play a music file with vlc it starts extremely slow - but it could be just me. The games I have start up normally though and I'm not experiencing any fps drop... I've noticed that if I restart the PC the compile time goes back to normal. Any advice to what may be causing this and how to fix it?

P.S. The ram usage is under 50% when that happens and the CPU may be even at 0% and at the same time I am waiting inexplicably long for some simple thing like properties showing up... Seems like Windows is "slow" and only at doing some tasks. My HDD works fine IMO as copying has a normal speed. The last things I did before this happened was install some custom windows themes, installed skype and copied around 100Gb from my external HDD - btw I still have around 500Gb free space (all of these could have just coincided with that).

Edited by lightxbulb

##### Share on other sites

Have you kept an eye on the ram and cpu as your programs are running? is it possible you have a memory leak eating all of your memory up ? Bar that it could be anything, virus, hardware change, just do the usual scans and such ! - a favorite of mine is ccleaner ;)

##### Share on other sites

Do you keep your operating system up-to-date?  Do you have virus/malware protection that's up-to-date and run on a regular basis?  Have you recently changed any hardware?

The last things I did before this happened was install some custom windows themes

What sort of custom windows themes?  While some people don't experience any problems, software like WindowBlinds and AstonDesktop can sometimes cause instability or hog resources -- especially if you're using a more complex theme.  Microsoft go to great lengths to ensure the default Explorer shell for Windows is compatible with almost any reasonably modern hardware you might be using, but the companies behind these sorts of theming packages just don't have the same level of resources to test on such a wide variety of set-ups.  If that (or something similar) is the type of theme you're talking about it could potentially be the culprit.

##### Share on other sites

Have you kept an eye on the ram and cpu as your programs are running? is it possible you have a memory leak eating all of your memory up ? Bar that it could be anything, virus, hardware change, just do the usual scans and such ! - a favorite of mine is ccleaner ;)

The CPU and the Ram are not the problem. And it's not a memory leak from what I see as my free Ram is almost the same as when I start up my PC (under 50% used Ram). I'll try CCleaner now. Thanks for the advice.

Do you keep your operating system up-to-date?  Do you have virus/malware protection that's up-to-date and run on a regular basis?  Have you recently changed any hardware?

I haven't changed any hardware. I have win7 and it's up to date. I really didn't install an anti-virus program   but I try to download safe things, so only Win Defender on this side and it didn't detect anything.

For the themes I used universal theme patcher.

The problem looks really like a memory leak issue because the longer the PC is on, the slower it starts up some things - though the Ram stays the same so it can't be a mem leak. And it's kind of odd how only some things start really slowly - I'm basically waiting for some trivial thing like properties to show up. I thought it might be an HDD issue but the HDD seems to work fine (normal copy speed).

And it's not like I am compiling something great - just an exercise:

#include <iostream>
using namespace std;

class Date
{
private:
int day, month, year;
public:
Date(int inputDay, int inputMonth, int inputYear)
:day(inputDay), month(inputMonth), year(inputYear){}

Date& operator ++ ()
{
++day;
return *this;
}

Date& operator -- ()
{
--day;
return *this;
}

void displayDate()
{
cout << day << " / " << month << " / " << year << endl;
return;
}
};

int main()
{
Date myDate(25, 7, 2013);
myDate.displayDate();
++myDate;
myDate.displayDate();

cin.ignore();
return 0;
}


Now, just after I started my PC it needed 1s to compile. Yesterday just before I shut down my PC it needed like 30s to compile and it stopped with great delay at every possible point.

Should I defrag my HDD(I don't see how this will help), should I check it for errors? Do you have any idea what might be causing this?

Thanks a lot guys, I really appreciate your help

##### Share on other sites

1. The most common problem that causes delays in compiling is your swap file. If you opened lots of programs after your last restart, and swap file got bigger few times, then anything you do will take exponentially longer (not just compiling) - it's simply an OS feature.

2. Also, compiling might coincide with some other heavy process/service being run (e.g. stuff like Indexing service or any other).

3. This is C++

##### Share on other sites

The odd thing is that this started just a few days ago. Never before have I experienced anything similar.

##### Share on other sites

To rule out any other potential SW, are you running only the Visual Studio or are there other apps (FireFox, Outlook, Photoshop, 3dsmax, ...) ?

I am asking since many years ago I suddenly experienced a very weird, regular (every 2 seconds) FPS dropdown in my 3D engine and spent 2 days profiling.

Turned out, it wasn't really my 3D engine but the FireFox [running in backgr] update that forced a CPU spike every 2 seconds. But since I've had the same set of tabs open for few months I didn't realize it until after one restart I chose not to run FireFox and the CPU spikes suddenly stopped.

It was an unfortunate coincidence that I was exactly in the middle of implementing A*, so my first hunch was that it's the A* causing the CPU spikes.

I'd try running just Visual Studio [for few days] to make sure it's not some other background app/process...

##### Share on other sites

I had my browser, explorer and vlc up with VS but I had them this morning too so I do not think that is it. Hopefully today I am not experiencing such a thing even now (and the PC has been on the whole day) - it may be that CCleaner fixed things - not sure, will see if I have nay problems tomorrow.

Thanks for the valuable advice guys!

P.S . I have not been running many programs on the PC though so it may be some of the apps I ran yesterday. Today it's working just fine(no delay at all). I suspect skype - as it was the last thing I installed and I used it the whole day yesterday - I haven't even started it today.

Edited by lightxbulb

##### Share on other sites

Well, Skype has become an obnoxious resource hog, lately.

I routinely find it occupies up to 250 MB of RAM (regardless of no active communication with anyone) and alt-tabbing to it takes sometimes even up to 5 seconds.

Especially if it "volunteers" you for an update, I always restart Windows afterwards, since the Skype Update routinely messes up the Windows [which is to be expected, though undesired].