• Creator
    Topic
  • #4053
    Marco
    Participant

      Hi,

      I have written a macro for creating new tasks. Everything works fine.
      But when I start the macro in remote mode the macro is very slow,
      about 4 or 5 seconds. In online mode, directly connected to the
      post office, the same macro is finished within 1 second.
      How to speed up?

      Here a sample of the macro:

      Set MyNewTask = GroupWise.Account.Calendar.Messages.Add(“GW.MESSAGE.TASK”, fgwPersonal)

      With MyNewTask
      .FromText = GroupWise.Account.Owner.DisplayName
      .OnCalendar = TRUE
      .Priority = fgwNormal
      .AssignedDate = StartDateCtrl.Date
      .StartDate = StartDateCtrl.Date
      .DueDate = EndDateCtrl.Date
      .Completed = FALSE
      if SubjectCtrl.Text <> “” then
      .Subject = SubjectCtrl.Text
      end if
      if MemoCtrl.Text <> “” then
      .BodyText.PlainText = MemoCtrl.Text
      end if

      for i = 1 to len(PriorityCtrl.text)
      Bu = Mid(PriorityCtrl.text, i, 1)
      if (asc(Bu) >= 48) AND (asc(Bu) <= 57) then
      TaskPrio = TaskPrio & Bu
      else
      TaskCat = TaskCat & UCase(Bu)
      end if
      next
      .TaskCategory = TaskCat
      .TaskPriority = TaskPrio
      End With

    • Author
      Replies
    • #6971
      Support 1a
      Participant

        Dear Marco,

        Thank you for your question. Unfortunately I don’t think you’ll be able to speed this up. When you use Remote Mode GroupWise needs to do significantly more work when you added a new message to the message store. (i.e. it needs to build remote requests and phsically write the entry to your remote database). Depending on the size of your Remote database, this is going to take some time.

        I’ve had a look at your code, and can’t spot anything that looks slow. Unfortunately, I suspect the delay is just an unfortunate side effect of using Remote mode with the Object API.

        Regards,

        Advansys Support

        #6970
        Marco
        Participant

          Hi,

          Thanks for the fast reply.

          > Unfortunately I don’t think you’ll be able to speed this up. When you
          > use Remote Mode GroupWise needs to do significantly more work when
          > you added a new message to the message store.
          > (i.e. it needs to build remote requests and phsically write the
          > entry to your remote database).

          Ok, I see.
          But creating new mail instead is fast!?
          Only creating tasks will be slow.

          > Depending on the size of your Remote database, this is going
          > to take some time.
          I have created a new account, just 5 or 6 messages and I used
          an account with over 12000 messages.
          The time is nearly the same, 4 or 5 seconds in remote, <1 second
          in online-mode.

          > I’ve had a look at your code, and can’t spot anything that
          > looks slow.

          I have found that the assignments are slow:

          .OnCalendar = TRUE
          .Priority = fgwNormal
          .AssignedDate = StartDateCtrl.Date
          .StartDate = StartDateCtrl.Date
          .DueDate = EndDateCtrl.Date

          Each line will increase the time for saving very much.
          Are you sure it is a problem of OBJAPI or Groupwise?

          Is there a way to setup the task with the correct values
          bevor saving it into the groupwise messagestore?

          #6972
          Support 1a
          Participant

            Dear Marco,

            Unfortunately there is nothing you (or us) can do to decrease the time it takes to create items using Remote Mode. Internally, item creation is different when using Remote – requests need to be created. As we didn’t write GroupWise, I can’t give you any details of specific differences between online and remote mode for different message types or the setting of discrete properties. As far as Formativ is concerned, there are no differences between online and remote mode.

            The only suggestion I can make is that you may wish to investigate the GroupWise.SendTask command, which creates a task in a single command. I haven’t tried it, but it uses the underlying token API, as opposed to the Object API.

            Regards,

            Advansys Support

          Viewing 3 replies - 1 through 3 (of 3 total)
          • You must be logged in to reply to this topic.