Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-76560

Calendar executes too many requests to server in order to get current time

    Details

      Description

      Calendar executes too many requests to server in order to get current time. That can cause performance issues.

      The code that request the time to server was added in LPS-65412

      Steps to reproduce

      1. Create a new page
      2. Install Calendar in new page
      3. Open it in "Day" or "Week" view
      4. Stay in the new page and open browser "Developer tools" => "Network" tab
      5. Wait two or three minutes
      6. You will view a request to following URL once a minute
        /c/portal/layout?p_l_id={PLID}&p_p_cacheability=cacheLevelPage&p_p_id=com_liferay_calendar_web_portlet_CalendarPortlet_INSTANCE_xxxxxxxxxxxx&p_p_lifecycle=2&p_p_resource_id=currentTime
        
      7. That requests are also written in tomcat log file localhost_access_log.2017-xx-xx.txt
        • Wrong behavior: Request are done once per minute
        • Expected behavior: Only one request is done. Javascript code will refresh time using local date from browser.

        Attachments

          Activity

            People

            Assignee:
            joyce.wang Joyce Wang
            Reporter:
            jorge.diaz Jorge Diaz
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 47 weeks, 6 days ago

                Packages

                Version Package
                7.0.0 DXP FP36
                7.0.0 DXP SP7
                7.0.5 CE GA6
                7.0.X
                7.1.0 M1
                7.1.X
                Master