View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
19204Bug reportsSpeed optimizationpublic2026-11-20 16:26
ReporterDenisChenu Assigned To 
PrioritynoneSeverityminor 
Status closedResolutionno change required 
Summary19204: When need a boolean as result : use scalar or count
Description

Looking at https://github.com/LimeSurvey/LimeSurvey/blob/28e201fe788800f9fb53856fdecf69bf6427b11e/application/models/UserGroup.php#L197

UserGroup->requestEditGroup : we ge-t all greoup to retuen a permission check.
It's better if we just return a count for eexample

LimeSurvey clearly need optimisation

Steps To Reproduce

Steps to reproduce

(Replace this text with detailed step-by-step instructions on how to reproduce the issue)

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat4
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

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2023-10-27 17:11

developer   ~78098

patch

replace return UserGroup::model()->find($criteria);
by return UserGroup::model()->count($criteria);

c_schmitz

c_schmitz

2026-11-20 16:26

administrator   ~87837

Thanks. This query looks up one group by its ID, so it only loads one row. A count would not be faster. Some places also need the group that is returned, so we keep it as it is.

Issue History

Date Modified Username Field Change
2023-10-27 17:11 DenisChenu New Issue
2023-10-27 17:11 DenisChenu Note Added: 78098
2023-10-27 17:11 DenisChenu Bug heat 0 => 2
2026-11-19 22:50 c_schmitz Status new => acknowledged
2026-11-20 16:26 c_schmitz Note Added: 87837
2026-11-20 16:26 c_schmitz Bug heat 2 => 4
2026-11-20 16:26 c_schmitz Status acknowledged => closed
2026-11-20 16:26 c_schmitz Resolution open => no change required
2026-11-20 16:26 c_schmitz Category _ Unknown => Speed optimization