Open a Project from Enterprise Via C# and Performance Problem

  • Thread starter Peter Schneider
  • Start date
P

Peter Schneider

Hi!

I've found this interesting article:
http://blogs.msdn.com/colbyafrica/a...g-an-enterprise-project-programmatically.aspx

My question is, if there's any other method to open an enterprise project
programmatically. I just cannot believe or
accept the above solution.

The task I've to achieve:
Open several (about 40) enterprise project files, insert many many tasks
(4000+) to them and save them back to the server.

I've already written an addin, which works fine, but as this takes very long
to finish, i want to run the import task in a batch on the server,
which takes me to my second question:
Is there any way to tweak the registry that task updates run faster when
connected to the project enterprise server?
If I run the import from the addin without being connected to the server it
takes about 2 minutes to create 2500 tasks - yet when connected
it takes 30+ min.... ;-/

Hope someone has any clue...

greetings, Peter
 
P

Peter Schneider

Hi Stephen!

Yes... ;-) Sad but true. Actually I fill in about 20 different columns and
use about 5 enterprise fields
but yes, that's all i do and it's very slow, perhaps not 30min, but at least
15-20 min...
The task I've to do is to sync a external xml file with several projects on
the server (insert tasks,
match and update existing tasks...) so I need to re-read the tasks several
times.
The algorithm seems to be ok and works fine in the gui but my problem is,
that it's too slow and
that I find no way to get a connection to the project server via the PIA
Application object in c#.

I've seen that updates are queued on the server and finished by a job and
that there's somehow a
waittime configured - it would be interesting if this value could be changed
by a registry key - perhaps this
would speed up the whole process.

greetings, Peter
 
R

Renke Holert [MVP]

Hi Peter,

I have written several Add-ins for Project and usually the performance
bottle neck is too intensive use of the object model. Consider caching data
in memory and make sure you access objects as less as possible. Make also
sure that you minimize write actions by first reading the content and decide
if an update is necessary.

I'm using ANTS Profiler to get a better understanding where the time is
spent:

http://www.red-gate.com/products/ants_profiler/index.htm

Hope this helps,
Renke

--
Renke Holert

Project MVP Germany
http://www.holert.com

Project FAQ
http://www.holert.com/project/faq
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top