Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
View this page "Optimizing Cake's Performance"
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
This discussion is about page optimizing-cakes-performance
flag
  14 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
optimizing-cakes-performance was created by Smelly_Eddie
Smelly_Eddie  
View profile   Translate to Translated (View Original)
 More options 10 June 2008, 14:20
From: Smelly_Eddie <OlliT...@gmail.com>
Date: Tue, 10 Jun 2008 06:20:51 -0700 (PDT)
Local: Tues 10 June 2008 14:20
Subject: View this page "Optimizing Cake's Performance"

Click on http://groups.google.com/group/cake-php/web/optimizing-cakes-performa...
- or copy & paste it into your browser's address bar if that doesn't
work.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Discussion on optimizing-cakes-performance" by SeanW
SeanW  
View profile   Translate to Translated (View Original)
 More options 10 June 2008, 17:33
From: SeanW <swalb...@gmail.com>
Date: Tue, 10 Jun 2008 09:33:17 -0700 (PDT)
Local: Tues 10 June 2008 17:33
Subject: Discussion on optimizing-cakes-performance
"If users commonly search 'product names' you may want to make that
field a FULLTEXT index. This will make searches much faster."

Have you verified this?  Using a fulltext index requires the "MATCHES"
function in the SQL, it doesn't get used if you do a "WHERE foo=" type
query.  I don't see any code in CakePHP that uses the MATCHES function.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Snook  
View profile   Translate to Translated (View Original)
 More options 10 June 2008, 19:11
From: "Jonathan Snook" <jonathan.sn...@gmail.com>
Date: Tue, 10 Jun 2008 14:11:59 -0400
Local: Tues 10 June 2008 19:11
Subject: Re: Discussion on optimizing-cakes-performance
I think it may have been referring to the use of LIKE queries compared
to FULLTEXT queries. And to that, I'm not sure which is faster
although I assume the latter. It may be interesting to look at Lucene.
(btw: a CakePHP implementation of Lucene would be awesome.)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Smelly_Eddie  
View profile   Translate to Translated (View Original)
 More options 10 June 2008, 19:41
From: Smelly_Eddie <OlliT...@gmail.com>
Date: Tue, 10 Jun 2008 11:41:29 -0700 (PDT)
Local: Tues 10 June 2008 19:41
Subject: Discussion on optimizing-cakes-performance
For custom searches i tend not to use Cake's queries, but build my
own. $this->Model->query($customSQL);

For searched I use a FULLTEXT matches, as appose to LIKE.   In the
simple tests I ran this was usually faster.  Though the numbers
varied, I decided to use this method instead.

Sean is absolutely right though, using cakes query calls will not
likely show any increase in performance.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
optimizing-cakes-performance was changed (view version 2) by Smelly_Eddie
Marcin Domanski  
View profile   Translate to Translated (View Original)
 More options 10 June 2008, 20:21
From: "Marcin Domanski" <tram...@gmail.com>
Date: Tue, 10 Jun 2008 21:21:18 +0200
Local: Tues 10 June 2008 20:21
Subject: Re: Discussion on optimizing-cakes-performance
Hey,
I don't think that a cake implementation is needed Zend_Search_Lucene
is awesome, and it doesn't have any dependencies from Zend Framework.
I'm building(finishing) a behavior wraping Zend_Search_Lucene + a
console tool for index generation  (primary for cookbook) its still
alpha but it works. it will be released soon.

As for the comparison - i planed to do some but with my basic tests -
it outperforms Mysql FULLTEXT couple times. ( LIKE %a% is way slower)
than FULLTEXT.

On Tue, Jun 10, 2008 at 8:11 PM, Jonathan Snook

--
Marcin Domanski
http://kabturek.info

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Snook  
View profile   Translate to Translated (View Original)
 More options 10 June 2008, 22:36
From: "Jonathan Snook" <jonathan.sn...@gmail.com>
Date: Tue, 10 Jun 2008 17:36:23 -0400
Local: Tues 10 June 2008 22:36
Subject: Re: Discussion on optimizing-cakes-performance

On Tue, Jun 10, 2008 at 3:21 PM, Marcin Domanski <tram...@gmail.com> wrote:
> I don't think that a cake implementation is needed Zend_Search_Lucene
> is awesome, and it doesn't have any dependencies from Zend Framework.

I wasn't sure but that's great to know. It's be great to see a model
behavior for this that would automatically create lucene documents for
every record and then maybe a search method that would allow records
to be retrieved. actsAs Lucene would be very nice. (and if you have
such a thing already, I'd love to see it :) )

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Snook  
View profile   Translate to Translated (View Original)
 More options 10 June 2008, 23:01
From: "Jonathan Snook" <jonathan.sn...@gmail.com>
Date: Tue, 10 Jun 2008 18:01:42 -0400
Local: Tues 10 June 2008 23:01
Subject: Re: Discussion on optimizing-cakes-performance

On Tue, Jun 10, 2008 at 3:21 PM, Marcin Domanski <tram...@gmail.com> wrote:
> I don't think that a cake implementation is needed Zend_Search_Lucene
> is awesome, and it doesn't have any dependencies from Zend Framework.

I wasn't sure but that's great to know. It's be great to see a model
behavior for this that would automatically create lucene documents for
every record and then maybe a search method that would allow records
to be retrieved. actsAs Lucene would be very nice. (and if you have
such a thing already, I'd love to see it :) )

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alain Veylit  
View profile   Translate to Translated (View Original)
 More options 10 June 2008, 23:09
From: Alain Veylit <Alain.Vey...@libraries.claremont.edu>
Date: Tue, 10 Jun 2008 15:09:19 -0700
Local: Tues 10 June 2008 23:09
Subject: Re: Discussion on optimizing-cakes-performance
Same here - 'd like to keep informed of your progress,
Alain

--
Alain Veylit
Application developer
Claremont Colleges Digital Library
The Libraries of the Claremont Colleges
Claremont University Consortium
909-621-8013

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dr. Tarique Sani  
View profile   Translate to Translated (View Original)
 More options 11 June 2008, 05:21
From: "Dr. Tarique Sani" <tariques...@gmail.com>
Date: Tue, 10 Jun 2008 21:21:15 -0700 (PDT)
Local: Wed 11 June 2008 05:21
Subject: Re: Discussion on optimizing-cakes-performance
On Jun 11, 3:01 am, "Jonathan Snook" <jonathan.sn...@gmail.com> wrote:

> I wasn't sure but that's great to know. It's be great to see a model
> behavior for this that would automatically create lucene documents for
> every record and then maybe a search method that would allow records
> to be retrieved. actsAs Lucene would be very nice. (and if you have
> such a thing already, I'd love to see it :) )

I have used Zend_Search _Lucene with cakePHP and it works great - but
I never figured out how to paginate the search results from Lucene

I have been toying with a actsAs FULLTEXT behavior

Tarique


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcin Domanski  
View profile   Translate to Translated (View Original)
 More options 11 June 2008, 09:24
From: "Marcin Domanski" <tram...@gmail.com>
Date: Wed, 11 Jun 2008 10:24:51 +0200
Local: Wed 11 June 2008 09:24
Subject: Re: Discussion on optimizing-cakes-performance
hey

On Wed, Jun 11, 2008 at 6:21 AM, Dr. Tarique Sani <tariques...@gmail.com> wrote:

> On Jun 11, 3:01 am, "Jonathan Snook" <jonathan.sn...@gmail.com> wrote:
>> I wasn't sure but that's great to know. It's be great to see a model
>> behavior for this that would automatically create lucene documents for
>> every record and then maybe a search method that would allow records
>> to be retrieved. actsAs Lucene would be very nice. (and if you have
>> such a thing already, I'd love to see it :) )

> I have used Zend_Search _Lucene with cakePHP and it works great - but
> I never figured out how to paginate the search results from Lucene

One can't use the built in paginator cause it would need a seperate
model with paginate and paginateCount . It's always an option...

I wasn't working on the paginating stuff yet but i think i just use
the LimitIterator.
From my benchamrks it's not really worth caching the results but
cookbook doesn't have such a big dataset... so im not yet sure if i'll
add caching.

Tarigue did you use Lucene as a crawler or as db search ?

About the current state:
the console indexer/searcher is working
the behavtior - searching is working  (without pagination)
Now i'm working on highlighting and limiting the text that is returned
for the results.

--
Marcin Domanski
http://kabturek.info


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dr. Tarique Sani  
View profile   Translate to Translated (View Original)
 More options 11 June 2008, 09:56
From: "Dr. Tarique Sani" <tariques...@gmail.com>
Date: Wed, 11 Jun 2008 14:26:09 +0530
Local: Wed 11 June 2008 09:56
Subject: Re: Discussion on optimizing-cakes-performance

On Wed, Jun 11, 2008 at 1:54 PM, Marcin Domanski <tram...@gmail.com> wrote:
> From my benchamrks it's not really worth caching the results but
> cookbook doesn't have such a big dataset... so im not yet sure if i'll
> add caching.

Caching in most cases will not be needed... Lucene was meant to be very fast

> Tarigue did you use Lucene as a crawler or as db search ?

crawler

Tarique

--
=============================================================
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=============================================================


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RichardAtHome  
View profile   Translate to Translated (View Original)
 More options 11 June 2008, 10:09
From: RichardAtHome <richardath...@gmail.com>
Date: Wed, 11 Jun 2008 02:09:57 -0700 (PDT)
Local: Wed 11 June 2008 10:09
Subject: Re: Discussion on optimizing-cakes-performance
The biggest performance improvement I've found so far is:

Unbind unused models! Simple, but very effective.

For example, a few pages in a project I'm working on needed deep
recursion (recursive = 3), which resulted in 4000+ queries O.o

The pages were timing out.

A few unbinds later and its down to 40+ queries.

Unbinding also has the added benefit of using less memory per request
too meaning your apps are the little bit more scalable.

On Jun 11, 9:56 am, "Dr. Tarique Sani" <tariques...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel.S  
View profile   Translate to Translated (View Original)
 More options 23 June 2008, 21:23
From: "Daniel.S" <dan...@streefkerkonline.com>
Date: Mon, 23 Jun 2008 13:23:29 -0700 (PDT)
Local: Mon 23 June 2008 21:23
Subject: Re: Discussion on optimizing-cakes-performance
Or, you could use the now built-in (1.2) Containable behaviour. I used
to use a lot of unbindModel calls, but on a recent project started
using Containable and it's much cleaner and easier.

On Jun 11, 7:09 pm, RichardAtHome <richardath...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
optimizing-cakes-performance was changed (view version 4) by Smelly_Eddie
Discussion subject changed to "View this page "Optimizing Cake's Performance"" by Smelly_Eddie
Smelly_Eddie  
View profile   Translate to Translated (View Original)
 More options 25 June 2008, 14:08
From: Smelly_Eddie <OlliT...@gmail.com>
Date: Wed, 25 Jun 2008 06:08:52 -0700 (PDT)
Local: Wed 25 June 2008 14:08
Subject: View this page "Optimizing Cake's Performance"

Click on http://groups.google.com/group/cake-php/web/optimizing-cakes-performance
- or copy & paste it into your browser's address bar if that doesn't
work.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
optimizing-cakes-performance was changed (view version 5) by Renan Gonçalves
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google