0
votes

I'm developing an vsto plugin for microsoft project, and all went well until one day. The problem is what my schedule is very big, maybe 39k tasks (lines) or more... i use lambda expression to get my tasks and work like this simple follow code: var lstTasks = Project.Tasks.Cast<MSProject.Task>().Where(w => !w.Summary).ToList();

var lstTasksInesperado = lstTasks.Where(w => w.GetField(App.FieldNameToFieldConstant("Tipo Manutenção")).ToLower().Equals("i")).ToList();

first, i get all my tasks where is not summary and convert to a list. second, i get my tasks where my CUSTOM FIELD (Pwa CustomField) called Tipo Manutencao is equals "i" and is now what my problem started. This second query is very, very slow... like 3 maybe 4 hours. This problem started whitout any explication... but is very persistent.

Obs: I have this problem only in some schedules (mpp), normally when it is in pwa.

Any help is welcome. Thanks.

1
Do you need 2 lists or only one ? Do you need to load all 39k records if yes why ?mybirthname
Yes, i need 2 lists, because for each list, i need separate filters but, it's not the point. yes, i need load 39k or more records because i development an report, and this 39k of records is only my tasks when is not summary. this schedule is very big.flvrm92
You mention that this is a problem only in some schedules, what is the run time like in schedules that aren't affected, and how many tasks do they have?Jon Iles
hi @JonIles many schedules have same tasks count, but execution time is very fast, like 30, 40 seconds.flvrm92
For the affected schedules, do they always have the long run time, or do you sometimes get good performance?Jon Iles

1 Answers

-1
votes

Problem solved using the IQueryable interface for selects.