Anonymous | Login | Signup for a new account | 2023-05-28 01:06 CDT | ![]() |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Viewing Issue Simple Details [ Jump to Notes ] [ Wiki ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||
ID | Category | Type | Reproducibility | Date Submitted | Last Update | |
0000631 | [In-Portal CMS] Optimization | feature request | always | 2010-03-19 11:39 | 2010-08-31 14:17 | |
Reporter | Dmitry | View Status | public | Project Name | In-Portal CMS | |
Assigned To | alex | Developer | ||||
Priority | normal | Resolution | open | Fixed in Version | ||
Status | needs feedback | Product Version | 5.1.0 | Target Version | Icebox | |
Time Estimate | No estimate | |||||
Summary | 0000631: Optimize HasAdditionalImages tag using single SQL for Lists | |||||
Description |
I propose to make category item tag HasAdditionalImages look like this: This will allow to check for category item additional images during list printing without additional sql for each printed category item. |
|||||
Additional Information |
/** * Allows to detect if item has any additional images available * * @param Array $params * @return string */ function HasAdditionalImages($params) { static $cache = null; $object =& $this->getObject($params); /* @var $object kDBList */ if (!isset($cache)) { $resource_ids = $object->GetCol('ResourceId'); $sql = 'SELECT ImageId, ResourceId FROM ' . $this->Application->getUnitOption('img', 'TableName') . ' WHERE ResourceId IN (' . implode(',', $resource_ids) . ') AND DefaultImg != 1 AND Enabled = 1 GROUP BY ResourceId'; $cache = $this->Conn->GetCol($sql, 'ResourceId'); } $resource_id = $object->GetDBField('ResourceId'); return array_key_exists($resource_id, $cache) ? $cache[$resource_id] : false; } |
|||||
Tags | No tags attached. | |||||
Reference | http://groups.google.com/group/in-portal-dev/browse_thread/thread/dc2f6487f72107a | |||||
Change Log Message | ||||||
Estimate Points | 0 | |||||
Attached Files | ||||||
|
![]() |
|
![]() |
|
![]() alex (manager) 2010-03-21 12:27 |
Bad news. Can't apply on 5.1.0 release, since it's already is changed via memcache on per-item basis. |
![]() Dmitry (manager) 2010-03-21 14:59 |
Is it sufficient enough to have it on Per Item basis in Caching? May be we can do this similar to what we ave proposed here and Cache results then? I guess we would need to reset it later on Per Item bases anyway, so the above idea might not work. |
![]() alex (manager) 2010-04-12 16:05 |
Moving to Future because of current memcache implementation already does that a better way. Discussion with Dmitry. |
![]() |
|||
Date Modified | Username | Field | Change |
2010-08-31 14:17 | alex | version | => 5.1.0 |
2010-04-12 16:05 | alex | Note Added: 0001867 | |
2010-04-12 16:05 | alex | Target Version | 5.1.0 => Icebox |
2010-03-21 14:59 | Dmitry | Note Added: 0001717 | |
2010-03-21 14:59 | Dmitry | Assigned To | => alex |
2010-03-21 14:59 | Dmitry | Status | active => needs feedback |
2010-03-21 12:27 | alex | Note Added: 0001715 | |
2010-03-19 11:39 | Dmitry | New Issue | |
2010-03-19 11:39 | Dmitry | Reference | => http://groups.google.com/group/in-portal-dev/browse_thread/thread/dc2f6487f72107a |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic![]() In-Portal Open Source CMS |