Speed

Posted · Add Comment

This topic contains 24 replies, has 10 voices, and was last updated by  Jennifer 7 years, 5 months ago.

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #11903

    John King
    Participant

    Hi,

    My client has been using birchpress for approx 6 months now. Everything is working fine however the speed of the system seems to be slowing as more data is added.

    Are there any tips / tricks for increasing the speed (e.g. indexing, etc) of the overall application?

    Thanks,
    John

    #11926

    Luke
    Keymaster

    Hi John,

    If there are lots of appointments in the database, you might need to delete them to improve the performance. We will add functionality to delete past appointments in the coming version.

    #11948

    John King
    Participant

    Thanks Luke – any idea when the next version will be released?

    #11970

    Luke
    Keymaster

    This feature is being developed. We will release the new version asap.

    #11971

    John King
    Participant

    Thanks Luke

    #16548

    Keith Humphries
    Participant

    Is this feature developed in the latest release? I feel like all the old appointments and bogging down our system. Isn’t there some script you can put in the database that say if an appointment is older than 5 days… delete that entry?
    My hosting provider is trying to push me to a VPS and charge me a ton of money monthly. And i have a feeling it’s because of this plug-in not being self-sustainable or optimized too well. Please help!

    #16567

    Luke
    Keymaster

    Keith,

    Please use the following code in Setting -> Custom Code -> PHP to clean up old appointments.

    
    <?php
    global $birchschedule, $birchpress;
    $start = $birchpress->util->get_wp_datetime(array(
     'date' => '07/25/2014',
     'time' => 0
    ));
    $start = $start->format('U');
    $end = $birchpress->util->get_wp_datetime(array(
     'date' => '07/26/2014',
     'time' => 0
    ));
    $end = $end->format('U');
    $birchschedule->model->booking->delete_appointments($start, $end, -1, -1);
    ?>
    

    As there is max execution time limit for PHP, please clean it month by month.

    #16686

    Wim De Nocker
    Participant

    When trying to apply the above code, I run into the following error:
    PHP Fatal error: Uncaught exception 'ErrorException' with message '<delete_appointments> is undefined in namespace <birchschedule.model.booking>'

    Installed the latest birchpress 2.9.3 version.

    #16714

    Luke
    Keymaster

    As for version 2.9, please use the following code.

    
    <?php
    global $birchschedule, $birchpress;
    $start = $birchpress->util->get_wp_datetime(array(
     'date' => '07/27/2014',
     'time' => 0
    ));
    $start = $start->format('U');
    $end = $birchpress->util->get_wp_datetime(array(
     'date' => '07/29/2014',
     'time' => 0
    ));
    $end = $end->format('U');
    $criteria = array(
    	'start' => $start,
    	'end' => $end,
    	'location_id' => -1,
    	'staff_id' => -1
    );
    
    $appointments = $birchschedule->model->booking->query_appointments($criteria, array());
    foreach($appointments as $appointment) {
    	$birchschedule->model->booking->delete_appointment($appointment['ID']);
    }
    ?>
    
    
    #16715

    Luke
    Keymaster

    As for version 2.9, please use the following code.

    
    <?php
    global $birchschedule, $birchpress;
    $start = $birchpress->util->get_wp_datetime(array(
     'date' => '07/27/2014',
     'time' => 0
    ));
    $start = $start->format('U');
    $end = $birchpress->util->get_wp_datetime(array(
     'date' => '07/29/2014',
     'time' => 0
    ));
    $end = $end->format('U');
    $criteria = array(
    	'start' => $start,
    	'end' => $end,
    	'location_id' => -1,
    	'staff_id' => -1
    );
    
    $appointments = $birchschedule->model->booking->query_appointments($criteria, array());
    foreach($appointments as $appointment) {
    	$birchschedule->model->booking->delete_appointment($appointment['ID']);
    }
    ?>
    
    
    #19113

    Grüne Erde GmbH
    Participant

    Hello,

    We’re having the exact same issue of the extreme long page loading time. The page loading takes almost 10 seconds where birchpress is active: http://tools.pingdom.com/fpt/dguG3x/http://www.grueneerde.com/info/shops/schlafberatung/

    We are using Birchpress since August 2014 actively and daily with about 30-40 appointments a month, 30 services in total in 15 locations in total. The Website is almost exclusively being used for the birchpress functionality and is running more or less alone on an Ubuntu VPS with 6 GB RAM, we don’t have much traffic either on that machine.

    Most apparently and with over 12.737 post meta entries we now have, the issue seem to be due to old appointments. and an extreme long page loading time.

    Plus, the WP PLugin Performance Profiler gave a whopping 72% Performance cost: BirchPress Scheduler Business Plus – 0.8451 sec – 72.05%

    What can I do? I pasted the php code you supplied under Setting -> Custom Code -> PHP, but I don’t really know how I am supposed to use that snippet?

    I would appreciate some help, cause right now is not really bearable.

    Thanks, Marc

    #19162

    Luke
    Keymaster

    We use WordPress API to store appointment data. That is, all data is saved in the wp_posts and wp_postmeta tables. As the wp_postmeta table cannot have index on the meta_value column(By WP design), it may hurt database performance if there are tons of appointments and database is not well-tuned.
    We are busy rewriting the plugin. In the future version, appointment data will be moved to separate tables which are well designed to improve performance greatly.

    #19169

    Grüne Erde GmbH
    Participant

    I understand, Looking forward for that new version.

    But till then we still have our slow loading website situation to fix: Could you please explain how I am supposed to use the mentioned PHP code you supplied? Or is the only solution to delete manually 10.000 db entries in the wp_postmeta table?
    Thanks, Marc

    #19214

    Grüne Erde GmbH
    Participant

    Any news?

    #21699

    Jonathan Perrotta
    Participant

    I’m having the same problem, but I barely have appointments given, and it’s taking more than a minute to load. I have a dedicated server just for this, and its the only functionality the site has.
    It’s unacceptable.
    Please, any news?
    Anything we can do to make the load time better?

Viewing 15 posts - 1 through 15 (of 25 total)

The forum ‘BirchPress Scheduler’ is closed to new topics and replies.

Comments are closed.