View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 04418 | Bug reports | Survey taking | public | 2010-06-14 20:30 | 2010-07-06 11:22 |
| Reporter | jdalegonzalez | Assigned To | c_schmitz | ||
| Priority | normal | Severity | minor | ||
| Status | closed | Resolution | won't fix | ||
| Product Version | 1.87+ | ||||
| Summary | 04418: group.php loops through all questions every time it's called | ||||
| Description | Around line 335 you'll see foreach ($_SESSION['fieldarray'] as $ia). What this means is that every time group.php is called, all questions will be traversed when only some will be part of the group in question. Since we're talking about memory traversal, this is probably not a huge deal until the number of questions gets very large - at which point having them all in memory might not work. In any case, it seems like it would be more efficient to either: a) when $_SESSION['fieldarray'] is being built, make note of the question index that marks a group boundary and update $_SESSION['grouplist'] with this value and then change the foreach into something like for($i = $_SESSION['grouplist'][$grouparrayno]['firstqindex']; $i < count)($SESSION['fieldarray'];$i++) AND break as soon as $ia[5] != $gid | ||||
| Steps To Reproduce | scan down to line 335 and verify my contention. | ||||
| Tags | No tags attached. | ||||
| Bug heat | 2 | ||||
| Complete LimeSurvey version number (& build) | 7987 | ||||
| I will donate to the project if issue is resolved | |||||
| Browser | all | ||||
| Database type & version | all | ||||
| Server OS (if known) | all | ||||
| Webserver software & version (if known) | all | ||||
| PHP Version | all | ||||
| Git branch / Pull Request URL | |||||
|
I don't think this is a big deal because a couple lines further in the foreach loop the Group ID is tested and if it does not match the foreach is continued. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-06-14 20:30 | jdalegonzalez | New Issue | |
| 2010-06-14 20:30 | jdalegonzalez | Status | new => assigned |
| 2010-06-14 20:30 | jdalegonzalez | Assigned To | => user372 |
| 2010-06-17 00:42 | c_schmitz | Note Added: 12238 | |
| 2010-06-17 00:44 | c_schmitz | Status | assigned => resolved |
| 2010-06-17 00:44 | c_schmitz | Resolution | open => won't fix |
| 2010-06-17 00:44 | c_schmitz | Assigned To | user372 => c_schmitz |
| 2010-07-06 11:22 | c_schmitz | Status | resolved => closed |
| 2010-10-25 00:18 | c_schmitz | Category | Survey at Runtime => Survey taking |