View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
04787 | Bug reports | Conditions | public | 2010-12-04 00:35 | 2011-04-11 13:33 |
Reporter | Assigned To | mdekker | |||
Priority | urgent | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.90+ | ||||
Fixed in Version | 1.91RC6 | ||||
Summary | 04787: Bug in getArrayFilterExcludesCascadesForGroup() function causing querying for too many questions | ||||
Description | I have a survey (group by group mode) in which at some point function getArrayFilterExcludesCascadesForGroup is executing getQuestionAttributes function for EVERY question in whole survey. I understand, that getQuestionAttributes function should be called only for questions in current group. Because I have an very important survey, in which there is about ~700 rows in questions table, making 700 queries per request costs a lot. | ||||
Steps To Reproduce | I can't attach the survey, but I'll try to reproduce/trace this problem on a smaller example later. | ||||
Additional Information | A little backtrace put in getQuestionAttributes function body: #0 getQuestionAttributes(14369) called at [/var/www/l/common.php:4676] | ||||
Tags | No tags attached. | ||||
Bug heat | 18 | ||||
Complete LimeSurvey version number (& build) | 9561 | ||||
I will donate to the project if issue is resolved | Yes | ||||
Browser | |||||
Database type & version | mysql | ||||
Server OS (if known) | debian lenny | ||||
Webserver software & version (if known) | Apache/2.2.9 | ||||
PHP Version | 5.3.3 | ||||
I checked a different survey, and the problem exists also there - in few first groups everything is ok, and at some point that function starts querying for every question in whole survey. |
|
Carsten passed me this solution - changing |
|
Verry weird thing... after passing question type, as Carsten suggested, and saving few hundreds of queries, the script execution time takes much longer. |
|
Any new findings on this? |
|
I'd like to figure this bug out - is there any chance you could build a survey that you can share, so I can try it? |
|
I've got a file here that replicates the problem: http://benian.nl/MISC/limesurvey_bug_4787.lss Steps to reproduce:
(I've tried on my own server and limeservice.com, same problem) |
|
Hey, sorry for not responding. I found that the problem lays somwhere in checkconfield function. Setting "deletenonvalues" to 0 helps, but ofcourse it's not the solution :) The problem happens in various longer surveys. It looks like in some point of that surveys "checkconfield" function starts to produce a huge number of queries. I can provide some other surveys if wanted. |
|
As suggested in http://bugs.limesurvey.org/view.php?id=4787#c13688 tried changing in getArrayFilterExcludesCascadesForGroup function:
|
|
Think I solved the problem by adding a little memory to functions that are called often: getArrayFiltersForQuestion and getArrayFilterExcludesForQUestion |
|
Fixed in svn 9964 by adding cache to some frequently called functions, please reopen if this does not fix the problem |
|
Please don't forget to commit this to _dev branch, too. |
|
done in 9967 |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2010-12-04 00:35 |
|
New Issue | |
2010-12-04 00:35 |
|
Status | new => assigned |
2010-12-04 00:35 |
|
Assigned To | => lemeur |
2010-12-04 00:42 |
|
Note Added: 13681 | |
2010-12-04 02:19 |
|
Note Added: 13688 | |
2010-12-04 02:48 |
|
Note Added: 13689 | |
2010-12-04 12:05 |
|
Issue Monitored: user11009 | |
2010-12-09 23:51 | c_schmitz | Assigned To | lemeur => jcleeland |
2011-01-31 16:49 | Mazi | Note Added: 14019 | |
2011-01-31 16:49 | Mazi | Status | assigned => feedback |
2011-02-18 00:33 | jcleeland | Note Added: 14247 | |
2011-03-24 22:07 |
|
Note Added: 14533 | |
2011-03-25 01:46 |
|
Note Added: 14535 | |
2011-03-25 01:46 |
|
Status | feedback => assigned |
2011-03-25 05:36 |
|
Note Added: 14536 | |
2011-04-05 09:11 | mdekker | Relationship added | related to 05068 |
2011-04-05 13:27 | mdekker | Note Added: 14671 | |
2011-04-05 13:31 | mdekker | Assigned To | jcleeland => mdekker |
2011-04-05 13:34 | mdekker | Note Added: 14672 | |
2011-04-05 13:34 | mdekker | Status | assigned => resolved |
2011-04-05 13:34 | mdekker | Fixed in Version | => 1.91RC5 |
2011-04-05 13:34 | mdekker | Resolution | open => fixed |
2011-04-05 13:51 | c_schmitz | Note Added: 14675 | |
2011-04-05 16:37 | mdekker | Note Added: 14677 | |
2011-04-11 13:33 | c_schmitz | Status | resolved => closed |
2011-04-11 13:33 | c_schmitz | Fixed in Version | 1.91RC5 => 1.91RC6 |