Inform7 slow compiling Windows 10 (windows defender problem)

EDIT: problem solved, turning off realtime protection in Windows Defender.

Hi everybody,

Since updating to Windows 10 (at least, that is the only thing I can think of that has changed) compiling is horribly slow for me. The first phase of the compiling goes quickly but the last step takes a long time (a minute or more). Even for a game with only one room. To make sure it isn’t my computer I installed Ubuntu in a virtual machine. The problem doesn’t occur there, so I gather that it might have something to do with Windows 10? I tried installing it at work (also Windows 10) and the same problem occurs there.

I pasted the console info here. It says it completed in under 1 second, so it might be something after the completing the compiling that is causing the hangup? (there is also the blue circle of windows).

Anyway, hopefully someone can help me with this!

Greetings,
Jorden

[spoiler]C:\Program Files (x86)\Inform 7\Compilers\ni
-internal “C:\Program Files (x86)\Inform 7\Internal” -project “S:\Geschiedenis\Schuddeboom backup\SCB\IF\testest.inform” -format=ulx
Inform 7 build 6L38 has started.
I’ve now read your source text, which is 8 words long.
I’ve also read Standard Rules by Graham Nelson, which is 42616 words long.
I’ve also read English Language by Graham Nelson, which is 2288 words long.

The 8-word source text has successfully been translated into an intermediate
description which can be run through Inform 6 to complete compilation.
There were 1 room and 1 thing.
Inform 7 has finished.

C:\Program Files (x86)\Inform 7\Compilers\inform6
-wSDG +include_path=…\Source,.\ auto.inf output.ulx
Inform 6.33N for Win32 (20th August 2014)
In: 1 source code files 65877 syntactic lines
54884 textual lines 1982403 characters (ISO 8859-1 Latin1)
Allocated:
8014 symbols (maximum 20000) 13801699 bytes of memory
Out: Glulx story file 1.160624 (582K long):
21 classes (maximum 200) 42 objects (maximum 640)
230 global vars (maximum 512) 85011 variable/array space (maximum 180000)
96 verbs (maximum 255) 316 dictionary entries (maximum 2000)
179 grammar lines (version 2) 251 grammar tokens (unlimited)
101 actions (maximum 200) 37 attributes (maximum 56)
40 common props (maximum 256) 18 individual props (unlimited)
108234 characters used in text 84895 bytes compressed (rate 0.784)
0 abbreviations (maximum 64) 2868 routines (unlimited)
68996 instructions of code 38974 sequence points
105216 bytes writable memory used 490496 bytes read-only memory used
595712 bytes used in machine 1073146112 bytes free in machine
Compiled with 1641 suppressed warnings
Completed in 0 seconds

Compiler finished with code 0[/spoiler]

[edited title to clarify this is a problem with Windows Defender]

I can confirm this. Compiling from the new IDE takes a while to finish in Windows (8.1 here). For comparison, the Mac version works faster in a slower machine (Mac is 2010 Core Duo, Win is 2013 i7).

I reported this quite awhile ago as well as search being extremely slow on Windows as well. I don’t remember what my investigations uncovered, but it should be in the forums somewhere.

Here’s the thread:

https://intfiction.org/t/inform-7-6l-windows-ide-slow/6814/1

The upshot of that thread seemed to be that Windows is horribly slow at writing files. Or, at least, slow enough that when you do thousands of fprintf() calls to construct a large file, you suffer. I have heard this in other contexts as well.

(For those who want to delve, it’s the debug_file_printf() function in files.c.)

Is there a way to compile the Windows version of I6 with better stdio functions? Bigger buffer, something, I don’t know?

Thanks DavidC, I’ve read the thread. Still in the new version you can turn off the debug stuff with a checkbox. And the problem isn’t fixed by that. Do you still experience the same problem?

Ah, checking the task manager I saw that windows defender goes to 50% of the CPU when the compiler is running. Turning of real time protection in windows defender fixes the problem. :smiley:

That’s weird. Why is Defender mucking with things? (rhetorical)

I had the same problem on Windows 7 using Windows Defender and Norton. My game would take an age to compile.

https://intfiction.org/t/inform-7-and-security-software/8895/1

For some reason, security software just doesn’t seem to like Inform 7.

I wonder if code-signing would allow Defender to ignore it.

This is definitely Windows Defender. When I turn off real-time protection, my Cloak of Darkness compiles instantly. With it turned on, it takes about 20 seconds.

So I added inform7.exe, inform6.exe, cBlorb.exe, ni.exe, and intest.exe as process exclusions. If course I’m telling the whole world this is an open vector for attacking my computer, but I7 compiles instantly now.

2 Likes

Well, interactive fiction can be very dangerous…

1 Like

It appears that Windows Defender is slowing down the generation of the index HTML files - it takes ages to scan each one, and succeeds in blocking the ni process until it has done each. The only solution I can see is to manually add ni.exe to the list of excluded processes.

Or comment out “Release along with source text.” until you need it.

Or change the IDE to offload the html creation to a second thread and allow the IDE to show “busy” when creating the Index.

Well, adding an exclusion to Win Defender solved the problem for me.

Guys, I’m doing my usual collation for telling Emily and I’m a bit divided on this thread.

There’s an issue here, and it’s real, and having to forego any sort of protection in any circumstances is not a very good thing, and DavidC even suggested a way in which this could be worked around IDE-wise.

On the other hand, it’s so specific and so easily workaroundable (even if unpalatable to some - not even all! - people) that it may not be worth the trouble.

D’you guys think there’s actually a need to bring this up?

Unfortunately DavidC’s suggestion is not going to make any difference. The point is that the build process happens when ni.exe is run (by the front end), and it is this that generates HTML files for the index. Windows Defender is interfering with this via its hooks into Windows, causing the index generating part of the ni.exe code to run rather slowly, so the build process takes longer than needed. There’s no point reporting this to Emily, as there is nothing she (or Graham) can do about this. I might try a few experiments at some point, but really either Microsoft fix Windows Defender to behave itself, or we have to live with it.

I recently upgraded to Windows 10, and the hang here is bad enough for me that I thought I7 had broken. I was trying everything - load as admin, various compatibility steps - and finally found this thread by googling to see if other people had this problem.

Even if there’s nothing Emily can do, it might be worth adding some kind of warning to the documentation - “if you have Windows 10, this will be hella slow, sorry.”