Compiling a project without creating the Index

I have a very large project and want to speed up the very slow compilation time.

(I’ve added exceptions to Windows Defender as per the advise elsewhere.)

I’ve managed to get Inform 7 compiling from the command line in Windows 10.

I’m wondering if the masses of index files created per compilation are causing the slowdown.

So, is there a way to compile the I7 story file without creating all the associated index files?

e.g. a special switch like the one in bold below:-

ni -noindex -internal “C:\Program Files (x86)\Inform 7\Internal” -project Z:\Inform\Projects\MyProject.inform"



There’s no way to disable index creation. However, creating the index files should be very fast, as it’s really just writing out information that the compiler has already generated. The only known cause of creating the index files being slow is interference from Windows Defender - you might want to double check that the project directory is one of those being excluded in the Windows Defender settings. (You could test this by temporarily turning off Windows Defender entirely - to do that you’d need to stop the Windows Defender service.

Thanks for the info, David.

Windows Defender is definitely behaving ok with my exception rules (I’ve disabled WD just to make sure).

Hmmm…I’ll need to do some more research as to why my compiler takes so long.

Just for me to benchmark, for a BLANK project (just containing “test is a room.”), it takes 7-8 secs from pressing F5 to launching the compiled story in the Windows Inform GUI. My laptop is nothing fancy (AMD A6-6310 APU, 8GB RAM, 64-bit Windows 10). Is this in line with the base case compilation time everyone is experiencing? I would have expected a blank project (albeit including the Standard Rules) to compile much quicker than that…

I’m might try and install Linux on the same machine to compare compilation times.

On this desktop machine, with a considerably older AMD Phenom II X4 955 CPU, 8Gb RAM and Windows 7, I get 3-4 seconds from F5 to the running story file. I do have quite a fast hard drive, though, and I would guess that the compilation process is more likely to be I/O bound than CPU bound. So your compilation time isn’t that far off the mark, but slower than I would have guessed. Is there anything else running on the laptop that could be interfering, like some other anti-virus?

I hate to be that guy, but Inform on Mac doesn’t seem to exhibit this problem when compiling…to the point I was shocked how poky the Windows version can be after first using it. I don’t think Inform is generally a resource hog. If you work with Inform 7 a lot and have access to a Mac or can justify an inexpensive used one to be a spare laptop and designated Inform machine, that might be a thing to think about.

Or Linux.

As I said in the other thread, I have a vague memory that this is down to stdio being awful on Windows.

Definitely; that’s a free option. I’m a dangerous computer klutz and I’ve managed to boot Ubuntu from a memory stick.

Hmmm, I have my doubts about that. My vague recollection is that there were problems running the MS-DOS build of Inform 6 on Windows ages ago, but that’s something entirely different. Searching with Google doesn’t bring up any obvious hits.

I’ve just tried compiling on my Windows 10 desktop machine (i5 processor) and compilation is MUCH quicker. Now, I know an i5 is a faster chip then an AMD6, but I still wasn’t expecting such a massive difference. Is perhaps the Inform build optimised for Intel? Could we have an optimised AMD build?

Both machines are running off an SSD btw.

The compiler hasn’t been built with any special optimization options for any given processor, and such things usually only make a small difference anyway. Certainly for compiling a big project it’s going to be a question of single-thread CPU performance (contrary to what I said earlier - that’s what I get for replying before the morning coffee).

Looking online, that AMD A6 6310 isn’t particularly fast: if look at you can see that it’s substantially slower than the Intel i5s: do you know exactly which Intel i5 your desktop has? If we had that we could work out from benchmarks what we’d expect the relative performance to be. But if your desktop has a fast Intel i5 it could be nearly twice as fast as the laptop. It’s the case that the performance of my desktop (with an old-but-fast AMD chip,, roughly matches the comparative timings for a simple project discussed earlier in this thread.

Hi David,

Sure. He’s some more details and calculations:-

i5 Windows 10 desktop
Intel® Core™ i5-2500K CPU @ 3.30GHz, 3310 Mhz, 4 Core(s), 4 Logical Processor(s) … GHz&id=804
Average CPU Mark: 6464
Single Thread Rating: 1899

AMD A6 laptop
AMD A6-6310 … 6-6310+APU
Average CPU Mark: 2415
Single Thread Rating: 841

Both machines running Windows 10 on a SSD.

Based on the above speed ratings of the CPUs, we would expect (crudely) the i5 to be 6464 / 2415 = 2.7 times faster (1899 / 841 = 2.3 for single thread).

On the AMD, for my large Inform test file, I get AMD compile time of approx 30 secs. Same file on i5 gives a compile time of just 9 secs.
So, based on the Inform 7 compile times, the i5 machine is 30 / 9 = 3.3 times faster. We would expect 2.3 to 2.7 based on above, so i guess the compile times are roughly in line with the CPU benchmarks.

As I like working from my laptop, my solution for now will be to compile remotely from my laptop to the desktop PC. (My main project I’m working on at the moment is taking nearly 3 minute to compile on the laptop!!! And this is just the Inform 7 side; I have some Python scripts generating lots of I7 code before this! Painful for a minor source edit!)

If only Inform 7 didn’t have to compile from stratch every run…!

Still doesn’t explain why Linux running on a virtual machine (which in itself should be much slower!) on the same laptop or desktop runs significantly faster though!! Maybe I should just move over to Linux on the laptop and have done with it (or buy a faster laptop!).

The ni compiler isn’t open source, but there are a select number of people (I’m not one) with access to the source code who could in theory disable the indexes generation so that we could tell whether that is actually relevant to this.

Is the Linux build on the desktop faster as well? Your last post suggests it … is it faster by the same fraction?

I really don’t think it’s the index generation, but you could check by running ni from the command line: the index files are only written out when ni.exe has printed out ++ 100% (Finishing work) when it’s nearly done.

You can disable generation of almost all of the Index files with the command-line option “-noindex”.

Edit: Oops, I see the initial post actually mentioned this option. Does it not work with the Windows binary? It works on OS X.

For a moderate size source file on the desktop machine, the VirtualBox Lubuntu running Inform seems to compile at about the same speed as the Win10 desktop (both are quick).

For further analysis and a more rigorous test, I’ve created a much larger new test file (which is just a large table - something Inform seems very slow at compiling - containing random numbers, text and a list of numbers). This file gives the compiler more to think about! I have attached the file so you and others can compile too.

The compilation timing results I get are as follows:

Win10: 57 secs
Win10 Lubuntu in VirtualBox: 1m 25 secs (85 secs)
(=> Win10 1.5 times faster than Lubuntu in VirtualBox)

Win10: 4m 55 secs (295 secs)
Win10 Lubuntu in VirtualBox: 6m 44 secs (404 secs)
(=> Win10 1.4 times faster than Lubuntu in VirtualBox)

So in actual fact, the plain Win10 compile times are faster than the Virtual Lubuntu compile times (which is what I would expect) by a very similar percentage on both the desktop and laptop machines.

I think this confirms that there is nothing strange going on with the Inform 7 Win 10 laptop (or indeed the Windows Inform build); only that the laptop is incredibly slow compared to the desktop!

I’d be interested to see some further tests of the above source file if someone has a dual boot machine (Win / Linux, or Mac) to compare the REAL (not virtual machine) compile times of the same file on the various builds for each OS.

All this has lead me to come to the conclusion: Inform 7 is incredibly slow at compiling tables! Why??? I know it has to compact the text strings and so on, but still…!
CompilerWorkout.txt (712 KB)

This is good to know, thanks! I guess that the laptop’s slow compile times is a reflection of the fact that the low-power CPUs in more modest laptops just don’t have great single-threaded performance.

Any idea why Inform is so slow at compiling large tables?

To be honest, no, I don’t. There isn’t any very obvious reason for the slowness. It might be worth filing a bug report at