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:
'http://zo-d.com/blog/archives/microsoft-project/microsoft-project-performance-limitations.html
'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
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.