« AOL Breach of Privacy and what it really means | Main | Massive Planetary Inflation - plutons held responsible »

Microsoft Project Performance Limitations

Someone was wondering the other day whether the limit on tasks in project would be constrained by the possible number of Unique ID's. They were concerned that the unique ID might be stored as a 16 bit number and that they could conceivably reach it over time. I am reasonably certain that the unique ID is at least a 32 bit number but since it is not documented, I thought I'd do a little test. To test it I tried to construct a project with more than 2^16 tasks (2^16 = 65536 )

My approach was to code up something which would add as many tasks as I wanted. Because there is always a concern that this might take a while I had it write to a log file along the way. And to get an idea of how long it would take I added a time stamp mechanism. What I found was what I expected... long before you get to 2^32 tasks (4,294,967,296 to be precise) you run out of time. Project becomes so sluggish that it becomes unreasonable to work with.

The reason is that Project stores the project in memory and that as the file grows larger, it becomes much more processor intensive to do anything with the file. To illustrate what I mean, here is a chart showing the time required to add tasks.


The straight line shows that as the file size grows, the time needed to add tasks increases almost linearly. The result of this is a power curve for the cumulative time required. Here you can see that it took about 45 minutes to add 30 thousand tasks. Extrapolating along this curve, adding 65536 tasks would take about 4.5 hours.

Going a bit further and adding the 1 million tasks which Microsoft claims is the limit for Project we find that it would take about 70 days. Along the way, we can look at the memory used by Project. I noted that as the number of tasks rose, the amount of memory that project utilized increased almost linearly as well. 30,000 tasks consumed 90 Megabytes of memory. If we extrapolate to 1,000,000 tasks that works out to 3 Gigabytes. And, in this case, the tasks consisted of just a name, no resources, no assignments, no dependencies, no notes, no formatting.

The point of all this is that Project is constrained more by the hardware you run it on than it is by any sort of fundamental limits to the data structure.

Tonight when I'm not working I'm going to try and see how long it takes to add 65K tasks. I expect it will take a few hours if my machine does not crash first. Of course I'm running this on my laptop with a 1.86GHz processor so a desktop machine will be faster. I do have 1GB of RAM thougn so if I run out of this and the computer starts paging to the disk then it will take considerably longer.

If you are curious about how well your computer performs, you can use the same code I used to check. It is probably best if you save any work and do not run this at a time when you expect to do anything else with your computer.

Sub PerformanceCheck()
'a simple tool to check the performance of Microsoft Project
'Copyright Jack Dahlgren, August 9, 2006
'for more information go to:
'Note: entering a total test size of greater than a few tens of thousands
'will occupy your machine for a considerable amount of time!
Dim i As Integer
Dim j As Integer
Dim step As Integer
If MsgBox("Warning! May Crash Your Computer. _
Save ALL Work Prior To Running This Macro!", _
vbOKCancel, "Warning!") = vbCancel Then
Exit Sub
End If
'open a new file to insert tasks into
FileNew SummaryInfo:=True, Template:="", FileNewDialog:=False
OptionsCalculation Automatic:=False
'get values for upper limit
j = CInt(InputBox("Enter the Total number of tasks you want to test for.", _
"Test Size"))
'get step size for log file
step = CInt(InputBox("Enter how many tasks for each interim performance check" _
& vbCrLf & "example - 1000", "Step size"))
'create a logfile and open for writing
'the logfile goes in the root directory
Dim MyFile As String

Dim fnum As Integer
Dim randID As Integer
randID = CInt(100 * Rnd())
'create filename with randID as a quasi-unique Identifier
MyFile = "c:\" & j & "tasks_performance" & randID & ".csv"
fnum = FreeFile()

Open MyFile For Output As fnum
Print #fnum, "performance test, " & j & " tasks"
Print #fnum, "Number of tasks:, Cumulative Elapsed Time:"

'get the start time of the test
Dim start, finish, current
start = Timer

'add tasks up to the total number
For i = 1 To j
'if the current task is divisible by the step size
'then write an entry to the log file
If i Mod step = 0 Then
current = Timer
Print #fnum, i & ", " & current - start
'reset the start to eliminate any time wasted writing to the file
start = start + Timer - current
End If
'add the task
ActiveProject.Tasks.Add (i)
Next i
Close #fnum

On Error GoTo myerror

MsgBox i & " tasks in " & current - start & " seconds"
Close #fnum

End Sub

This will give you a rough idea of how project performs on your computer. It is highly dependent on how much memory is available and how much processing power you have available. As a result, your findings may be different from what I have found by a large factor.

UPDATE: Of course things can always go faster. In this case I added a bit of code to turn off recalculation OptionsCalculation Automatic:=False and the required time to add 1,000,000 tasks drops to about 250 hours. 65536 tasks should take around an hour.

UPDATE #2: Adding 70,000 tasks took an hour and 13 minutes. The Unique ID field did not break. The empirical formula on my computer with Project 2000 for elapsed time is approximately 9E-7 * (number of tasks)^2. This translates to 250 hours to add a million tasks. Updating a million tasks on a weekly basis would be approaching the far edge of ridiculous. Such a thing is not the job for MS Project.

  • MS Project VBA - Trim Function
  • Microsoft Project Undo Levels and Macros
  • On the Other Side of the Mountain
  • Cramming for the Microsoft Project 2007 Certification Exam
  • Eight Miles High - Microsoft MVP Summit
  • Microsoft Project 2007 Bugs - Project Server too...
  • Microsoft Project 2007 Import Problems
  • VBA Writing to a text file (MS Project, Excel)
  • Microsoft Project 2007 Released
  • Using a ComboBox in a Microsoft Project Userform

  • Comments (3)

    1GB is far to small from our experience. For our 5,000 to 8,000 schedules, the minimim machine is 3GB memory and a 3.5GHz process. Around that size there are problems with previewing the Gantt for printing - the first dozen or so pages are dispalyed and the remaining are not.

    Project Server and some form of linkage between activities - this is a very important architectural issue that we've worked through over the past year. By designing the linkages around the "verticle" aspects of IMP/IMS you can minimize the number of horizontal connections and at the same time maximize the architectural integrity of the schedule.

    Chad Ehnis:

    I'm a newbie here - I've been an MSProject user for a number of years now (I'm one of the people who defends it stating, 'once you get used to it, you'll love it'. Anyway - I'm helping a colleague out and here's my question:

    He has a template w/3,200 tasks which represents ONE project. History tells us that over the course of a year, this person will need to manage 40 - 50 projects. I'm trying to persuade this person to use a Master Project File for a variety of reasons, although I'm not sure if MSProject can handle that many tasks. As a side note - he's using MSProject Professional 2003. His machine has a 1.8 G processor and 1G of RAM.

    Would MSProject allow this person to insert 40-50 projects (connected to a separate resource pool) into a Master Project plan and still be functional?


    If the objective is to determine the maximum number in Unique ID then you've chosen the least efficient way to do it.


    insert task

    cnt = cnt+1

    log cnt

    delete task


    My approach takes advantage of the fact that Project reuses the ID but not the UniqueID.


    My objective was primarily to demonstrate that numerical limits are, at least in this case, far beyond the limitations imposed by performance of the application on ordinary hardware. Far enough beyond that you are unlikely to ever reach them. For example, this person was concerned about running out of UID's if they deleted/created a project repeatedly. On my machine it would take more than a week to create a million task project. If you did that as fast as you could (on my machine) it would take more than a hundred years before you ran out of UID's. An unlikely scenario in my opinion.

    Post a comment

    (Comments are moderated to fight SPAM and will be published after I have a chance to approve them. Thanks for waiting.)


    The previous article is AOL Breach of Privacy and what it really means.

    The next article is Massive Planetary Inflation - plutons held responsible.

    Current articles are in the main index page and you can find a complete list of articles in the archives.

    Creative Commons License
    This weblog is licensed under a Creative Commons License.
    Powered by
    Movable Type 3.34