New Version pisearch 1.24 Speed Version

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Piratos

New Version pisearch 1.24 Speed Version

Post by Piratos »

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
Last edited by Piratos on Thu Oct 27, 2005 3:16 pm, edited 1 time in total.
lemkepf
Forum Members
Forum Members
Posts: 163
Joined: Tue Oct 18, 2005 8:30 pm

Re: New Version pisearch 1.2

Post by lemkepf »

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 .
Hows the speed of searching a larger site?
Piratos

Re: New Version pisearch 1.21

Post by Piratos »

Hows the speed of searching a larger site?
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.

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.
Piratos

Re: New Version pisearch 1.22

Post by Piratos »

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";
Piratos

Re: New Version pisearch 1.22

Post by Piratos »

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
lemkepf
Forum Members
Forum Members
Posts: 163
Joined: Tue Oct 18, 2005 8:30 pm

Re: New Version pisearch 1.22

Post by lemkepf »

Do you mean:
Adodb - Version 18.97234 Seconds? instead of 18,97234?
Piratos

Re: New Version pisearch 1.22

Post by Piratos »

instead of 18,97234?
More time as the page without searching a word and im using Adodb, the other value is Mysql - direct without Adodb.

The time are measured with Firefox 1.07  - the times with IE are both 0,5 - 0,6 Seconds better.
Piratos

Speed Version 1.24

Post by Piratos »

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
lemkepf
Forum Members
Forum Members
Posts: 163
Joined: Tue Oct 18, 2005 8:30 pm

Re: New Version pisearch 1.22

Post by lemkepf »

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?

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' ");
That takes 2500 queries down to 1.... thoughts?
Piratos

Re: New Version pisearch 1.24 Speed Version

Post by Piratos »

Yeah but than i have 2500 contents in the memory
lemkepf
Forum Members
Forum Members
Posts: 163
Joined: Tue Oct 18, 2005 8:30 pm

Re: New Version pisearch 1.24 Speed Version

Post by lemkepf »

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?
Piratos

Re: New Version pisearch 1.25 Speed Version

Post by Piratos »

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.
lemkepf
Forum Members
Forum Members
Posts: 163
Joined: Tue Oct 18, 2005 8:30 pm

Re: New Version pisearch 1.24 Speed Version

Post by lemkepf »

What's the speed with 5000 pages?
Piratos

Re: New Version pisearch 1.24 Speed Version

Post by Piratos »

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.
Last edited by Piratos on Fri Oct 28, 2005 6:59 am, edited 1 time in total.
JDoe

How to make?

Post by JDoe »

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...
Locked

Return to “Modules/Add-Ons”