• I wondered why SC was so slow in rendering a schedule.
    After some time spent I discovered the following:
    In the file …\sh4\shifts\view\widget.php the view is prepared several times.
    – when function render() is called
    – when function renderPrepared() is called
    – when function renderTitle() is called

    It is easy to solve this problem.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author plainware

    (@plainware)

    Hello,
    thank you for your feedback! As a quick improvement, I’ve added a cache for this function, could you please replace this file on your site to check if it helps:
    /sh4/shifts/view/widget.php

    sh4-shifts-view-widget.zip

    Thread Starter martenw

    (@martenw)

    Its working perfect!

    Thread Starter martenw

    (@martenw)

    Also the function getShifts() in sh4\schedule\html\view\common.php is called three times every time a schedule is rendered.

    Probably also a cache will do here?

    Plugin Author plainware

    (@plainware)

    ok, here it is
    /sh4/schedule/html/view/common.php
    sh4-schedule-html-view-common.zip

    Thread Starter martenw

    (@martenw)

    Thank for the update. It works fine.

    One more question:
    I am using the shortcode [shiftcontroller4 type=”day” time=”now”] to show the schedule of the current day.
    It shows the schedule correctly, except that parts of the html are embedded in
    <code class=”hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon”>

    How can I get rid of this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Schedule prepared many times’ is closed to new replies.