Uploaded image for project: 'Task Management'
  1. Task Management
  2. TASKMGMT-28

Avoid creating User throwaway objects in TaskManager API

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Neutral
    • None
    • 1.2.2

    Description

      Upon logging into AdminCentral, when Pulse initialises, the following method gets called several times
      getTasksAmountByUserAndStatus:192, DefaultTasksManager (info.magnolia.task)
      which, in turn, triggers
      getUser:264, MgnlUserManager (info.magnolia.cms.security).
      This results in the same user instance being created like 10 times.
      Probably not much of a overhead and in any case the instance is local to a method so it will be thrown away immediately, still there could be room for some improvement.

      Could be probably fixed if the TaskMgmt API would pass around the User object instead of just the user id, but that's quite a change on its own. If we passed the User object to TaskManager - we would be able to re-use User from MgnlContext.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                fgrilli Federico Grilli
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Checklists

                    Task DoD