-
AuthorPosts
-
Mo0nlight Moderator
Mo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
October 11, 2016 at 7:58 am #975240Hi.
I edited the code in your site.
File : /components/com_jak2filter/models/itemlist.php Line 112-117
$ifield = 'id, title, alias, catid, published, introtext, video, gallery, extra_fields, created_by, created_by_alias, trash, access, featured, image_caption, image_credits, video_caption, video_credits, hits, params, plugins, language'; $ifield = 'i.'.str_replace(', ',', i.', $ifield); $query = "SELECT DISTINCT {$xf} {$ifield},{$select_group_tags} CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged, c.name as categoryname,c.id as categoryid, c.alias as categoryalias, c.params as categoryparams"; //$query = "SELECT DISTINCT {$xf} i.*,{$select_group_tags} CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged, c.name as categoryname,c.id as categoryid, c.alias as categoryalias, c.params as categoryparams";
Line 1541-1549:
$searchPattern = $prefix.'"('.implode('|', $refValue).')"';// in category and its children $likearr=array(); foreach ($refValue AS $rv) { $likearr[] = 'i.extra_fields LIKE \'%{"id":"'.$fid.'","value":"'.$rv.'"}%\' '; } $searchPattern = implode(' OR ', $likearr); $where[] = '('.$searchPattern.')'; /*$searchPattern = $prefix.'"('.implode('|', $refValue).')"';// in category and its children $where[] = "(i.extra_fields REGEXP '".$searchPattern."')";*/
Your site now run faster than before. But it’s still slow for united states options because it contains many children. it will be faster if you can disable some more children.
Please remember this code only work for this case not work if you will apply it further .Regards.
vernontee Friendvernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
October 17, 2016 at 2:30 am #976919Then its not exactly a solution right.. reason being that there are so many cities and states all over… is there no way you can improve the way its searched for performance
Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
October 28, 2016 at 2:20 am #981214Hi,
You can use this solution for now, we will update the performance in upcoming version. Please stayed tune.
Regards
vernontee Friendvernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
October 30, 2016 at 3:49 pm #981758hi… may i know when the updated version will be out?
Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
November 22, 2016 at 7:33 am #988463Hi,
I have tried to query your database with MariaDB (new development of MySQL) And it’s surprising that it’s faster than before. See the time query in the image. The MariaDB got nearly 1 sec.
If possible, you can consider to install the Mariadb on your host.
Regards
-
AuthorPosts
This topic contains 19 replies, has 3 voices, and was last updated by Mo0nlight 8 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum