View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
10743 | Bug reports | Survey editing | public | 2016-03-11 12:17 | 2016-03-16 09:18 |
Reporter | ollehar | Assigned To | ollehar | ||
Priority | high | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.50.x | ||||
Target Version | 2.50.x | Fixed in Version | 2.50.x | ||
Summary | 10743: Remove all count(findAll()) from Survey_Common_Action | ||||
Description | There's a bunch of $arr = $db->findAll(); in Survey_Common_Action.php. This is slow for big surveys. Should use this function: $count = Table::Model()->count("field=:field", array("field" => $fildID)); Source: http://www.yiiframework.com/forum/index.php/topic/10662-count-on-a-findall-query/ | ||||
Tags | No tags attached. | ||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | latest | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | - | ||||
Database type & version | - | ||||
Server OS (if known) | - | ||||
Webserver software & version (if known) | - | ||||
PHP Version | - | ||||
It's much worst than that. The only way do it really well, would be to move all those stuff from core/controller/helpers/views to the model. But for now : debugging. |
|
The solution doesn't have to be perfect. :) And it's easy enough to fix - just replace db->findAll() with db->count() (built-in Yii function). |
|
This commit fixes some: 43bdc29ea03a80d55520b7130f1fda909e3226f3 |
|
Version 2.50+ Build 160316 released |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2016-03-11 12:17 | ollehar | New Issue | |
2016-03-11 13:07 | c_schmitz | Assigned To | => ollehar |
2016-03-11 13:07 | c_schmitz | Status | new => assigned |
2016-03-11 13:07 | c_schmitz | Priority | none => high |
2016-03-11 13:25 |
|
Note Added: 36403 | |
2016-03-11 13:50 | ollehar | Note Added: 36406 | |
2016-03-11 14:31 | ollehar | Note Added: 36409 | |
2016-03-11 14:33 |
|
Note Edited: 36403 | |
2016-03-11 14:37 | ollehar | Status | assigned => resolved |
2016-03-11 14:37 | ollehar | Fixed in Version | => 2.5 |
2016-03-11 14:37 | ollehar | Resolution | open => fixed |
2016-03-16 09:18 | c_schmitz | Note Added: 36545 | |
2016-03-16 09:18 | c_schmitz | Status | resolved => closed |
2019-11-01 17:25 | c_schmitz | Category | Survey design => Survey editing |