In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
1106 [In-Portal CMS] Optimization refactoring N/A 2011-08-24 03:15 2012-07-25 05:33
alex  
alex  
normal  
closed 5.1.3-RC2  
fixed  
 
none 5.2.0-B1  
https://groups.google.com/d/topic/in-portal-dev/Szyz5Vvon6Q/discussion
Reduces perform db query count
1
0001106: Sorting setting storage improvement ideas
In Admin Console In-Portal makes 4 requests to database during each list-style template display. For example on Phrases list such requests are made:

SELECT VariableValue, VariableName
FROM PersistantSessionData
WHERE VariableName = 'lang_Sort1.' AND PortalUserId = -1
LIMIT 0,1

SELECT VariableValue, VariableName
FROM PersistantSessionData
WHERE VariableName = 'lang_Sort1_Dir.' AND PortalUserId = -1
LIMIT 0,1

SELECT VariableValue, VariableName
FROM PersistantSessionData
WHERE VariableName = 'lang_Sort2.' AND PortalUserId = -1
LIMIT 0,1

SELECT VariableValue, VariableName
FROM PersistantSessionData
WHERE VariableName = 'lang_Sort2_Dir.' AND PortalUserId = -1
LIMIT 0,1

If we change sorting to be stored in one persistent session variable instead of 4 in "FieldName1,order1|FieldName,order2...." format, then we:

1. save 3 requests to database each time
Plan:
1. code to be changed is located in kDBEventHandler
2. idea is to replace 4 calls to getListSetting/setListSetting method with 1 call (to each method)

patch sorting_storage_1106.patch (11,593) 2011-10-21 11:49
http://tracker.in-portal.org/file_download.php?file_id=1267&type=bug
patch sorting_storage_v3.patch (11,482) 2011-10-26 04:16
http://tracker.in-portal.org/file_download.php?file_id=1273&type=bug
Issue History
2012-07-25 05:33 alex Note Added: 0005069
2012-07-25 05:33 alex Status resolved => closed
2011-10-26 04:17 alex Note Added: 0004098
2011-10-26 04:17 alex Status reviewed and tested => resolved
2011-10-26 04:17 alex Fixed in Version => 5.2.0-B1
2011-10-26 04:17 alex Resolution open => fixed
2011-10-26 04:17 alex Assigned To !COMMUNITY => alex
2011-10-26 04:17 alex Changeset attached 5.2.x r14697
2011-10-26 04:17 alex Note Added: 0004097
2011-10-26 04:17 alex Assigned To alex => !COMMUNITY
2011-10-26 04:17 alex Status needs testing => reviewed and tested
2011-10-26 04:16 alex File Added: sorting_storage_v3.patch
2011-10-22 05:24 alex Estimate Points => 1
2011-10-21 11:50 erik Note Added: 0004084
2011-10-21 11:49 erik File Added: sorting_storage_1106.patch
2011-10-21 11:48 erik File Deleted: sorting_storage_1106.patch
2011-10-21 06:56 erik Time Estimate Removed 1 =>
2011-10-21 06:56 erik Note Added: 0004082
2011-10-21 06:56 erik Assigned To erik => alex
2011-10-21 06:56 erik Developer => erik
2011-10-21 06:56 erik Status needs work => needs testing
2011-10-21 06:55 erik File Added: sorting_storage_1106.patch
2011-10-14 02:27 alex Description Updated bug_revision_view_page.php?rev_id=878#r878
2011-10-14 02:26 alex Additional Information Updated bug_revision_view_page.php?rev_id=876#r876
2011-10-13 22:52 Dmitry Assigned To => erik
2011-10-13 22:52 Dmitry Status active => needs work
2011-09-26 05:00 alex Time Estimate Added 1
2011-09-11 23:19 Dmitry Target Version Icebox => 5.2.0
2011-08-24 03:15 alex New Issue
2011-08-24 03:15 alex Reference => https://groups.google.com/d/topic/in-portal-dev/Szyz5Vvon6Q/discussion
2011-08-24 03:15 alex Change Log Message => Reduces perform db query count

Notes
(0004082)
erik   
2011-10-21 06:56   
patch attached - needs testing
(0004084)
erik   
2011-10-21 11:50   
created upgrade script additionally
(0004097)
alex   
2011-10-26 04:17   
Tested.

Fixed some variable names, e.g. "sortings" except "sort".
(0004098)
alex   
2011-10-26 04:17   
Fix committed to 5.2.x branch. Commit Message:

Fixes 0001106: Sorting setting storage improvement ideas
Commit on behalf of Erik
(0005069)
alex   
2012-07-25 05:33   
Since 5.2.0 version was released.