Performance Issue on writing Timephased Data

Microsoft Project

    Next

  • 1. Obtaining Email Settings Information using PSI
    Hi, I have been searching the PSI documentation but could not seems to find which web services I should use to extract Email Settings information such as SMTP, From address. The admin web services only allows ask to set these information and not extracting it. Regards Godrid
  • 2. Did you find a solution for this?
    We are having the same issue. Did you find a solution for this?
  • 3. PS2007: How to get assignments where I am owner (RES_UID_OWNER)?
    Hello, I can read my assignments through PSI web service, no problem, technically, the value of RES_UID of an assignment is then my own UID. But how to read assignments through PSI web service where I am the owner and not the assigned resource? The value of RES_UID_OWNER is my own UID then and RES_UID is from another resource. (I checked it by peeking into the MSP_ASSIGNMENTS table in SQL Server database). I totally failed to read assignments where I am owner, please help. Good bye Termin_Terminator
  • 4. Show total percentage of project assigned to a resource
    Hello All, I have a question dealing with percentages for resources. Is there any way on the resource usage and/or task usage to show the following: 1. What part of the project is assigned to the resource in percentage and total numberof days/weeks/months etc. 2. What percentage of the the project does a specific task include. For example if the project is ten days and a specific task is five days then that task is fifty percent of the total projects' duration. I am sure that there are fields that show this information in both the resource usage and task usage but I can't find them. Any help would be greatly appreciated. Regards, Rob
  • 5. timed msgbox?
    I want to show a msgbox asking the user a question. if they don't respond within 3 seconds, i want the answer to default to "No" and the code to continue. is there a way to do this? thanks scott

Performance Issue on writing Timephased Data

Postby VmFsZXJpbw » Sat, 09 Jan 2010 18:19:01 GMT

Someone knows why writing timephased data through code has such a bad 
performance?

I've have develop a procedure to import the assignment timephased data from 
a excel file into project.

This procedure is a Project add-in written in c#.

Here's a sample of the code that runs for each assignment:

oRCProject.Application.OptionsCalculation(false, false, false, false, false, 
Missing.Value, false, Missing.Value, Missing.Value, Missing.Value, 
Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, 
Missing.Value);
for (int iQuarter = 0; iQuarter < aQuarters.Count; iQuarter++)
{
MSProject.TimeScaleValues oNewAssTSV = oNewAss.TimeScaleData(dtQuarterStart, 
dtQuarterFinish, 
MSProject.PjAssignmentTimescaledData.pjAssignmentTimescaledWork, 
MSProject.PjTimescaleUnit.pjTimescaleQuarters, 1);
double dQuarterValue = Convert.ToDouble(aQuarters[iQuarter]);
oNewAssTSV[1].Value = dQuarterValue;
}

The last line of code has a very long execution time, 90% of the elaboration 
time has been occupied by these code.
Furthermore the execution time grows at each call, passing from a 10ms to 
300ms after 3000 hits. 
Obviously it's not only a write of a value, there're other operations 
performed.
Someone know what kinds of operations are performed by this call?
There's a way to disable these operations and postpone them after the finish 
of the procedure?

Thanks
Valerio

Re: Performance Issue on writing Timephased Data

Postby Rod Gill » Mon, 11 Jan 2010 06:08:21 GMT

I responded in your post to the other NG, I don't think the answer has 
changed!

I would first write this coder in VBA and get it working. Add-ins are
inherently slower than VBA which runs in the same process as the App. If VBA
is slow, then Project is the problem. If not, then your addin is.

I don't understand the MSProject.TimeScaleValues oNewAssTSV =
oNewAss.TimeScaleData(dtQuarterStart line:

If you work with the timescalevalues of a new Assignment variable without
first pointing the variable to an existing assignment, you will get very
strange results which I think is what you have!

Get it working in VBA then port to Visual Studio. This process is obviously
much faster and easier when writing in VB, which is what I recommend for
office Add-in development.


-- 

Rod Gill
Microsoft MVP for Project -  http://www.**--****.com/ 

Author of the only book on Project VBA, see:  http://www.**--****.com/ 









__________ Information from ESET Smart Security, version of virus signature database 4757 (20100109) __________

The message was checked by ESET Smart Security.

 http://www.**--****.com/ 




Similar Threads:

1.Performance issue on writing timephased data

2.Writing Timephased Data from MS Excel into MS Project 2003

I'm working on a project for a senior manager who believes in the miraculous 
programming capabilities of non-programmers. The goal of her presumptuous 
project is for (initially just) myself and (now an expert) fellow programmer 
to be able to take total work hours and total cost of a given employee from a 
company generated SAP HR System spreadsheet and to write them into her 
Microsoft Project 2003 file - with a snap of her beautiful and skinny 
fingers! And just for her benefit. Urgh.

We are using VB.NET/Visual Studio.NET 2003 on Windows XP. We have imported 
the necessary objects/references. We have the .NET framework setup. All our 
patches are installed.

So far, we've been sucessfull in pulling the necessary values we need from 
her messy excel spreadsheet and writing them into another/a clean excel 
spreadsheet (EmployeeID, AssignmentID, TotalEmployeeHours, and 
EmployeeTotalCost, PayPeriod). Our Unique Identifiers for writing the values 
are EmployeeID and AssignmentID.

We've written code to convert hours from the excel spreadsheet to minutes 
and to split that into the corresponding number of working days in MS Project 
file for the given pay period. Then those values get assigned to the 
appropriate dates. We are doing this based on Assignment. A little speedbump 
was Project wanting to take values only in pairs : 15th/16th , 17th/18th etc 
(Writing individual dates crashes the application). No problem. Worked around 
that with a few mathematical calculations and variable comparisons. One more 
little quirk we noticed while developing was that project would need to be 
saved or refreshed before the values that were written in could be seen 
accurately.

Now, when we try to write to Project and to save our file, we see that it 
only writes the first couple of lines and then it gives us a 
"System.Runtime.InteropServices.COMException" error (description:  the 
argument value is not valid). 

We've been using the TimeScaleValue Collections/Object to do most of our 
writing. I am quite sure that our logic is sound. At first we thought it 
might be a memory error. But, after getting so close to completing it and 
being so frustrated that I can't understand what the eff is going on any 
more, I thought I'd reach out to get some comments/feedback.

If there is anyone who knows what might be going on or has the knowledge to 
help, please write back. I would be ok with sending over the code and test 
files for you to take a look at.

Thank you very much.
Sincerely,
Carina Hira

3.Statusing ReadAssignments/Timephased data security issues

4.Protected Baseline & Timephased data issue

I have cleared the "Save Protected Baseline" authorization to the project 
managers group on My Projects category.
Now project managers cannot save protected baseline, but cannot change 
TIMEPHASED data on CURRENT values for BUDGET resources.
This is a big issue because project manager must change the current values 
of the budget (but not the baseline).
Is there any way to fix this issue?
Many thanks,
Patrizio.

5.Performance Issue

What is the hardware spec that we should prepare for projects that average
have more than a thousand tasks ??
I already tried with 1500 tasks.
I have a performance problem once I saved that project. it does not enough
to 10 minutes and then I have to enforce to stop the process from Windows
Task Manager.
My project professional 2002  running in the Pentium III 1 GHZ with 512 MB
RAM, when I saving the project, the CPU Usage become 100%, and then I have
to wait that state for more than 10 minutes but without any succeed.

Is there anyone had got this problem like me ?


6. Performance issue when opening MS Proj Pro 2003 through citrix

7. Project Server 2003 Performance issues with Baseline

8. Performance issue for Project Server 2003



Return to Microsoft Project

 

Who is online

Users browsing this forum: No registered users and 74 guest