From f6d756a0c14103c2b47639071ec0d6be780108a2 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 20 Oct 2021 13:53:19 +0200 Subject: [PATCH] closing/commiting the session to speed up calendar loading --- api/src/Etemplate/Widget/Select.php | 3 +++ api/src/Framework.php | 6 ++++++ calendar/inc/class.calendar_owner_etemplate_widget.inc.php | 3 +++ 3 files changed, 12 insertions(+) diff --git a/api/src/Etemplate/Widget/Select.php b/api/src/Etemplate/Widget/Select.php index e8c8844cff..3a17b09bc6 100644 --- a/api/src/Etemplate/Widget/Select.php +++ b/api/src/Etemplate/Widget/Select.php @@ -966,6 +966,9 @@ class Select extends Etemplate\Widget */ public static function ajax_get_options($type, $attributes, $value = null) { + // close session now, to not block other user actions + $GLOBALS['egw']->session->commit_session(); + $no_lang = false; if(is_array($attributes)) { diff --git a/api/src/Framework.php b/api/src/Framework.php index a77e6cd406..ba46c31d2b 100644 --- a/api/src/Framework.php +++ b/api/src/Framework.php @@ -1662,6 +1662,9 @@ abstract class Framework extends Framework\Extra */ public static function ajax_user_list() { + // close session now, to not block other user actions + $GLOBALS['egw']->session->commit_session(); + $list = array('accounts' => array(),'groups' => array(), 'owngroups' => array()); if($GLOBALS['egw_info']['user']['preferences']['common']['account_selection'] == 'primary_group') { @@ -1688,6 +1691,9 @@ abstract class Framework extends Framework\Extra */ public static function ajax_account_data($_account_ids, $_field, $_resolve_groups=false) { + // close session now, to not block other user actions + $GLOBALS['egw']->session->commit_session(); + $list = array(); foreach((array)$_account_ids as $account_id) { diff --git a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php index 8ae9a50850..6d503c6c92 100644 --- a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php +++ b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php @@ -138,6 +138,9 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist */ public static function ajax_owner($id = null) { + // close session now, to not block other user actions + $GLOBALS['egw']->session->commit_session(); + // Handle a request for a single ID if($id && !is_array($id)) {