Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Speed Enhancement Modules for larger sites

Quote Reply
Speed Enhancement Modules for larger sites
CoolIt is possible to make a module of cache that:
Increases speed of searches by storing all search results until the specified cache time period has expired. The first access for a given keyword will have to be searched, while anyone else doing the same search will get the cached version. Smile

-=-=-=-=-=-=-=-=-
LinksSQL User
-=-=-=-=-=-=-=-=
Quote Reply
Re: Speed Enhancement Modules for larger sites In reply to
Geezzee.. I actually talked about this probably a year ago :)

There are a lot of problems with that.

have you looked and seen if there are a lot of duplicate searches? What percentage of searches you get that are the same, per unit time?

My top_5 keyword mod does daily tracking of keywords (by calendar day), and you can use the database it generates to find out what your top searches are, and if it pays to consider doing something like that.

I was thinking about this problem about a year ago, you might want to search through the forums here to see what was said about it. Might give you some other ideas. The context was in over all database performance.

When I look at my searches, there are a few that do occur regularly, and I could proabably pre-generate them, and just hard-link to them, but that number is small enough that it doesn't pay (yet) for me. It's amazing what people do look for, and it's all the people looking for 'sex' 'porno' 'nude' 'naked girls' etc, that chew up all the search time. I have 10-15 bogus searches for each "real" search (by keyword, not number). I was looking at the search logs for some of my sites yesterday, and was just shocked!

I need to spiff up the top_xx keywords module, to merge it into one unit that returns all the requested searches, but which also does a regex exclusion on a "bad words" list to get rid of all the x-rated and obscene searches people do.

I have almost all family sites (postcards, photos, links, etc), and "sex" is still the #1 keyword on most of them. Scarey. (oddly, on the two sites that are more targeted to adults, 'sex' is _NOT_ the #1 keyword <G>)


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Speed Enhancement Modules for larger sites In reply to
Ok Pugdog we can work in one I modulate for this? for a site with great volume of data it would be of good use, therefore the speed of access and reply of the data base and essential.

-=-=-=-=-=-=-=-=-
LinksSQL User
-=-=-=-=-=-=-=-=
Quote Reply
Re: Speed Enhancement Modules for larger sites In reply to
I have added some filter codes in my search.cgi file that ignores certain words that are submitted. I am going to totally replace the up-front filter I have with these codes, so that it will allow people the freedom to search for whatever they want, but "bad words" will not be logged.

Regards,

Eliot Lee

Quote Reply
Re: Speed Enhancement Modules for larger sites In reply to
I do things a bit differently. I log the bad words, but I don't output them on the keyword/search lists <G>

I'm interested in what people are searching on.... even if I don't make the bad-words public.


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Speed Enhancement Modules for larger sites In reply to
Hi Janio,

This could be done very easily as a plugin. Basically, add a table called SearchCache that stores search term, generated html, and timestamp. Then if a search term matches it will return the same html.

The downside is that if you change the data, then the cache is showing old data. This is not usually an issue with large sites though.

I'll make an example plug in for you.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Speed Enhancement Modules for larger sites In reply to
Hmm, expanding on that, the plug in could detect if we were in mod_perl, and if so store the results in memory. You could even use GT::Cache to store the top 500 queries in memory. Ah the possibilities.. =)

Cheers,

Alex

--
Gossamer Threads Inc.