View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
19462Bug reportsOtherpublic2026-11-20 17:20
ReporterDenisChenu Assigned To 
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Summary19462: More optimisationn on SurveyGroup::getInstance
Description

We improve SurveyGroupSettings::getInstance to avoid multiple call of DB for same SurveyGroup but there are another improvment

In same request (on each survey list)

  1. we call SurveyGroupSettings::getInstance with group 1 and survey 1234 :
    • Evaluate SurveyGroup options for 1 and update with survey 1234
  2. we call SurveyGroupSettings::getInstance with group 1 and survey 1235 :
    • Evaluate SurveyGroup options for 1 and update with survey 1235

Then we evaluate 2 times SurveyGroupSettings options for SurveyGroup 1

We can not pit it in static without code update since we chack Survey 2 times : https://github.com/LimeSurvey/LimeSurvey/blob/bbc3eb6f3c21f24ba7343348408b6c26fd42e03e/application/models/SurveysGroupsettings.php#L362 and https://github.com/LimeSurvey/LimeSurvey/blob/bbc3eb6f3c21f24ba7343348408b6c26fd42e03e/application/models/SurveysGroupsettings.php#L345

A solution can be (must be constructed)

  1. Create a SurveyGroupSettings::geSurveyGrouptInstance function without Survey
  2. Put the function result in static (in cache in future ?)
  3. Direct return if survey is null in SurveyGroupSettings::getInstance
  4. Call and update by survey is Survey is ste.
TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version
Git branch / Pull Request URLN/A

Relationships

related to 19371 closedlajosarpad Survey list page extremely slow when having alot of surveys and inheritance is used for 'List publicly' 

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2026-11-20 17:20

administrator   ~87848

Loading a survey ran several unneeded database queries each time. This is fixed in master now, and pages that list many surveys load much faster. What is left of the repeated settings evaluation costs very little, so no further change is planned here.

Issue History

Date Modified Username Field Change
2024-03-06 08:10 DenisChenu New Issue
2024-03-06 08:10 DenisChenu Relationship added related to 19371
2026-11-19 22:50 c_schmitz Status new => acknowledged
2026-11-20 17:20 c_schmitz Note Added: 87848
2026-11-20 17:20 c_schmitz Bug heat 0 => 2
2026-11-20 17:20 c_schmitz Status acknowledged => closed
2026-11-20 17:20 c_schmitz Resolution open => fixed