NO

Author Topic: Win10: Exe Slow Startup after fresh compile  (Read 5024 times)

Offline tony74

  • Member
  • *
  • Posts: 34
Win10: Exe Slow Startup after fresh compile
« on: July 21, 2023, 02:12:13 AM »
I've been a win7 user for ages. Recently just got a new xeon workstation with win10, put Pelles C on it and tried it out.
One thing I notice is that on a first-run after I compile, the compiled exe is pretty (really) slow to start.
Once the initial first-run is done, the app starts normally thereafter.

As long as I don't compile again, it starts fast, but if I compile it to a new exe, the first-run is really slow to start.

This didn't happen on win7, so is it something to do with windows security/UAC/Defender?
Does my stuff need to be signed? I didn't do a manifest of any sort (it's just a CLI test app), would that hang things up in win10?

Just thought I'd ask in case it was a known issue/idiosyncrasy.

Offline MrBcx

  • Global Moderator
  • Member
  • *****
  • Posts: 189
    • Bcx Basic to C/C++ Translator
Re: Win10: Exe Slow Startup after fresh compile
« Reply #1 on: July 21, 2023, 06:50:57 AM »
One thing you could try is to add your app's project folder to the Windows Exclusion list.

Settings | Windows Security | Virus & Threat Protection  | Manage Settings | Add or Remove Exclusions

That solves 99% of my Windows Defender related hassles.
Bcx Basic to C/C++ Translator
https://www.BcxBasicCoders.com

Offline Vortex

  • Member
  • *
  • Posts: 864
    • http://www.vortex.masmcode.com
Re: Win10: Exe Slow Startup after fresh compile
« Reply #2 on: July 21, 2023, 10:58:47 AM »
Hi tony74,

You didn't mention about any other antivirus software. Maybe, it could interfere with your application.
Code it... That's all...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Win10: Exe Slow Startup after fresh compile
« Reply #3 on: July 21, 2023, 12:54:09 PM »
From virus scanner, exclude folder option is good way to avoid delays.
May the source be with you

Offline John Z

  • Member
  • *
  • Posts: 858
Re: Win10: Exe Slow Startup after fresh compile
« Reply #4 on: July 21, 2023, 12:55:55 PM »
Hi tony74,

I ran Pelles C for a long time on Windows 10 without issue. Only caveat is it was not a ‘workstation’.
Good bet as others have suggested is to check the antivirus software.  Disconnect from the internet then disable the antivirus software and try Pelles again. I use GData antivirus works well but occasionally flags a program I wrote - I send to them and they adjust the scanner.

John Z

Offline tony74

  • Member
  • *
  • Posts: 34
Re: Win10: Exe Slow Startup after fresh compile
« Reply #5 on: July 21, 2023, 04:43:41 PM »
Thanks everybody.

I'm running Bitdefender and an early version of PrivateFirewall. MS Defender and it's firewall are supposedly disabled, but Defender still runs in the background, I've discovered.
After having some files/directories copied off another drive 'disappear' on pasting them to C:, I found they ended up in defender's quarantine.

I'm not particularly in favor of Bitdefender, but I had to replace Avira which had a growing false positive rate with every update, it actually quarantined a bunch of .h, .c, and .bat files several times on my win7 system - I discovered it's heuristics for removal sometimes depend on 'where' you keep a file, even if it's a text-based bat file (C:\users\owner was a no-no for non-system authored bat files).

On the win10 machine, I did try entirely removing Bitdefender before posting here to see if that would make a difference, but put it back on afterwards when the laggy first-run behavior persisted.

This acts like the system or something running on it are 'examining' files before allowing them to run or be moved on to the C: drive, I'm leaning towards MS Defender still being active, especially with the 'disappearing file' episodes.

On one occasion, I pasted a directory off another drive to C:, it pasted the folder and two of the files within the folder, but then took several *minutes* to finally paste the remaining files within the folder...extremely odd, sortof screams 'examination', eh?

Checking on the web, I do find instances of similar behavior on 10, but every case is different, often the OP's behavior descriptions are lacking detail and no general solutions popped up.

Thanks again for having a look, it seems we all suspect the same thing, generally, I'll post back if I have any luck running ti down.