Caching DB With Memcached

77 views
Skip to first unread message

Aaron Maturen

unread,
Jun 26, 2012, 10:39:32 PM6/26/12
to resour...@googlegroups.com
Has anyone played around with Memcached (http://memcached.org/) in order to speed up the DB queries? It seems like most of the queries done by ResourceSpace could take advantage of some caching… 

-- 
Aaron Maturen

Tom Gleason

unread,
Jun 26, 2012, 11:13:14 PM6/26/12
to resour...@googlegroups.com
I have tried this. 
It's not, though, a simple matter of caching search queries. I think optimizing RS is just going to be a lot of analysis and work. 

There is a lot of cacheable information, and some of it could use an outside cache like memcached. But even within particular PHP scripts, there is information that can be cached pretty simply per script in php arrays alone (like keyword resolution). I wouldn't say 'most' of the queries could use the memcached type of caching, as this presents new problems in terms of the freshness of data, but it could extend the type of caching I mention (like keyword resolution) beyond the per-script basis. Caching like this is often worthwhile, but it does take work.

On the other hand, there are some functions in RS like get_resource_field_data() which are inefficient and used on scripts which are harder to evaluate with tools like the performance footer. I have begun to implement alternative algorithms for this one in certain scripts in Prismpoint Portal. The main inefficiencies there are twofold: 1. all resource data is gathered, even if a subset is required, and 2) in the case of multiple resources, repetitive queries to get field information, and then joins to resource_data which in my experience can become slow in situations like this. 

But yeah! Any ideas about how to optimize RS are great! I expect that as the larger installations with good support grow, there will be general improvements in all these areas.

Tom




-- 
Aaron Maturen

--
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To post to this group, send email to resour...@googlegroups.com.
To unsubscribe from this group, send email to resourcespac...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/resourcespace?hl=en.



--
Tom Gleason
ResourceSpace Hosting & Development

Vice President, Engineering
Colorhythm LLC
http://www.colorhythm.com

Main Office:  +1 415-399-9921
Fax: +1 253-399-9928
Mobile:  +1 347-537-8465

tgle...@colorhythm.com
Reply all
Reply to author
Forward
0 new messages