New Version pisearch 1.24 Speed Version
New Version pisearch 1.24 Speed Version
Here is the download http://piratossmarty.pi.funpic.de/function.pisearch.zip
New Features:
The pages are fetched with smarty and than searching begins.
So Contents of plugins or modules would be searched too.
Output formatting would be better.
Changed to 1.24
New Features:
The pages are fetched with smarty and than searching begins.
So Contents of plugins or modules would be searched too.
Output formatting would be better.
Changed to 1.24
Last edited by Piratos on Thu Oct 27, 2005 3:16 pm, edited 1 time in total.
Re: New Version pisearch 1.2
Hows the speed of searching a larger site?Piratos wrote: Here is the download http://piratossmarty.pi.funpic.de/function.pisearch.zip
New Features:
The pages are fetched with smarty and than searching begins.
So Contents of plugins or modules would be searched too.
Output formatting would be better.
Known error:
if you seek "test" with php 5.05 you get a warning. it must be a php 5.05 error, because all other words get's no warning. test would be find .
Re: New Version pisearch 1.21
i don't work with this cms no more and so i test only with 20 pages on local webservers and there it is very fast.Hows the speed of searching a larger site?
if you have a large site so test it please and report it here - time to generate a page without search and with search - the difference must be the search time.
Last edited by Piratos on Wed Oct 26, 2005 1:20 pm, edited 1 time in total.
Re: New Version pisearch 1.22
you can speed up the cms if you set an index in the table content field hierarchy and change in class.content.inc.php
to this $query = "SELECT * FROM ".cms_db_prefix()."content ORDER BY hierarchy";
to this $query = "SELECT * FROM ".cms_db_prefix()."content ORDER BY hierarchy";
Re: New Version pisearch 1.22
my test:
425 Content Pages - Word was found in 420 Pages
Adodb - Version 18,97234 Seconds
Mysql - direct 16,6568 Seconds
170 Content Pages - Word was found in 165 Pages
Adodb - Version 8,201 Seconds
Mysql - direct 7,323 Seconds
425 Content Pages - Word was found in 420 Pages
Adodb - Version 18,97234 Seconds
Mysql - direct 16,6568 Seconds
170 Content Pages - Word was found in 165 Pages
Adodb - Version 8,201 Seconds
Mysql - direct 7,323 Seconds
Re: New Version pisearch 1.22
Do you mean:
Adodb - Version 18.97234 Seconds? instead of 18,97234?
Adodb - Version 18.97234 Seconds? instead of 18,97234?
Re: New Version pisearch 1.22
More time as the page without searching a word and im using Adodb, the other value is Mysql - direct without Adodb.instead of 18,97234?
The time are measured with Firefox 1.07 - the times with IE are both 0,5 - 0,6 Seconds better.
Speed Version 1.24
That is it !!!
In the new version 1.24 a content is only fetched with smarty if in the content is a {.
Not each page has a smarty tag and that is the reason of the good speed now.
The results
2005 pages are searched
Generated in 6.541597 seconds by CMS Made Simple 0.11-beta4 (cached) using 2024 SQL queries
205 pages are searched
Generated in 1.212142 seconds by CMS Made Simple 0.11-beta4 (cached) using 224 SQL queries
In the new version 1.24 a content is only fetched with smarty if in the content is a {.
Not each page has a smarty tag and that is the reason of the good speed now.
The results
2005 pages are searched
Generated in 6.541597 seconds by CMS Made Simple 0.11-beta4 (cached) using 2024 SQL queries
205 pages are searched
Generated in 1.212142 seconds by CMS Made Simple 0.11-beta4 (cached) using 224 SQL queries
Re: New Version pisearch 1.22
Question:
Why not use a join on your query? Instead of making a query for every single contet page, use a join.
Combine these 2 statements into one sql statement?
That takes 2500 queries down to 1.... thoughts?
Why not use a join on your query? Instead of making a query for every single contet page, use a join.
Combine these 2 statements into one sql statement?
Code: Select all
$dbresult = $db->Execute("SELECT content_id,menu_text FROM ".cms_db_prefix()."content WHERE active ='1' AND type ='content' ");
$dbra = $db->Execute("SELECT content FROM ".$config['db_prefix']."content_props WHERE content_id=".$row['content_id']);
Code: Select all
$dbresult = $db->Execute("SELECT c.content_id,c.menu_text,p.content FROM ".cms_db_prefix()."content c INNER JOIN ".$config['db_prefix']."content_props p on c.content_id = p.content_id WHERE c.active ='1' AND p.type ='content' ");
Re: New Version pisearch 1.24 Speed Version
Yeah but than i have 2500 contents in the memory
Re: New Version pisearch 1.24 Speed Version
So?
I believe it's faster to have that much in memory than to have 2500 two-way trips to a mysql server.
Can you test it at least to see which one is faster? The magic solution might be to limit the results to 100 for each of the queries and just do more of them?
I believe it's faster to have that much in memory than to have 2500 two-way trips to a mysql server.
Can you test it at least to see which one is faster? The magic solution might be to limit the results to 100 for each of the queries and just do more of them?
Re: New Version pisearch 1.25 Speed Version
Ok it's done
The result searching 205 pages is:
Generated in 1.051407 seconds by CMS Made Simple 0.11-beta4 (cached) using 20 SQL queries
I have tested it with 5000 !!! pages too and no problems with memory and .. nobody has 5000 pages, they have 20 .. 200 pages.
The result searching 205 pages is:
Generated in 1.051407 seconds by CMS Made Simple 0.11-beta4 (cached) using 20 SQL queries
I have tested it with 5000 !!! pages too and no problems with memory and .. nobody has 5000 pages, they have 20 .. 200 pages.
Re: New Version pisearch 1.24 Speed Version
What's the speed with 5000 pages?
Re: New Version pisearch 1.24 Speed Version
The results:
Die Suchbegriffe wurden in folgenden 5000 Seiten gefunden: -> Suchworte (Microsoft):
Generated in 15.295801 seconds by CMS Made Simple 0.11-beta4 (cached) using 20 SQL queries
The searchtime is only 4.384 seconds - the difference is the time the cms always need .
The cms needs 10.911801 seconds to present the homepage without any searching (total 5005 records in the database) !!!
That is a very slow cms and whishy must do a lot . The reason is, that each time with gettallcontents the complete database is reading to build the menu. if he build the menu if someone editing a page or create a new page he and his cms and the users are the winners.
Die Suchbegriffe wurden in folgenden 5000 Seiten gefunden: -> Suchworte (Microsoft):
Generated in 15.295801 seconds by CMS Made Simple 0.11-beta4 (cached) using 20 SQL queries
The searchtime is only 4.384 seconds - the difference is the time the cms always need .
The cms needs 10.911801 seconds to present the homepage without any searching (total 5005 records in the database) !!!
That is a very slow cms and whishy must do a lot . The reason is, that each time with gettallcontents the complete database is reading to build the menu. if he build the menu if someone editing a page or create a new page he and his cms and the users are the winners.
Last edited by Piratos on Fri Oct 28, 2005 6:59 am, edited 1 time in total.
How to make?
How to make the pisearch to print search results in separated page or template?
It's very inconvinient to display the search results only on the mainpage...
It's very inconvinient to display the search results only on the mainpage...