Consulting

Results 1 to 2 of 2

Thread: Can this MSP script get any faster?

  1. #1

    Exclamation Can this MSP script get any faster?

    Hi all

    We're trying to import some records from an excel sheet into project on a regular basis, in the neighbourhood of 10,000 tasks worth.

    To have it running as quickly as possible (because we can't use Unique ID's, we are using a custom Record ID field from the source data), I load the whole spreadsheet into memory in an array, load all tasks and subtasks into 3 separate dictionaries, with their task ID's as keys, then the main loop goes through each row in the array, and if the record ID exists in the task dictionary, then it updates 10 or so fields for that task, if it doesn't exist, it matches other pieces of info in the array with the summary tasks dictionary, and adds a task at that ID '+1'.

    It works, but we are trying to do this for 10,000 tasks, and it's taking about 10-15 minutes for users on the slower machines (1-1.5GB ram, Single core CPU).

    on the fastest machine (quad core, 8GB ram) it still takes about 5 minutes.

    I've gotten to the point of trying silly little things, like turning the 'With tasks(x)' part into a function, and it's still not any faster.

    If anyone has any experience with this stuff, or thinks they know a way to make this faster, please let us know! Dumping all 10,000 tasks (after 3 conditons are met, which atm every task meets) into an array and then dumping that array to excel only takes about 16 seconds.

    Why does this take 10 minutes?

    C

    Oh - and before anyone asks, Excel is hidden, and screenupdating and calculation in both apps is off.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,765
    Location
    At 10 minutes for 10,000 importations each unit is taking 6ms. 10 - 15 minutes ain't bad.

    Let me tell you what I understand of what you're doing from your description.

    Many Users, each User has unique 10K item task list. Load task list into array, distribute array into 3 ea 10K item dictionarys. Compare Array Items to first dictionary and process or use second dictionary to processs. Discard third dictionary. Send something to MSProject.

    Can you explain your complex and lengthy process with a bit more detail?

    A good explanation might take two screens of text, compared to the one brief paragraph you now have.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •