Pat Allan wrote: > I'm definitely aware that the facets code is far from ideal currently... but > there is one big limitation: there's no way to avoid a query per facet. > > That said, there's definitely some ways to speed things up: > * Switch to id facet queries, instead of loading *all* objects per facet > query. > * Make all the queries in one request (Sphinx supports this, TS doesn't yet > do so). > * Not instantiate objects unless necessary (Sphinx returns attribute values). > > Obviously, I should have done this a lot sooner. Hopefully I can make some > time for it soon! :)
Massive props to Pat, he just pushed a commit to github that cut the mean response time of my faceted search page from 1022ms to 453ms. It's still doing multiple sphinx queries, but it avoids instantiating AR objects if possible. If you don't get a speed increase from this, try switching your facets to be integers or booleans. Hopefully we'll see a new gem release soon, in the meantime checkout the diff at [1]. -- James Healy <[email protected]> Tue, 17 Aug 2010 22:52:23 +1000 [1] http://github.com/freelancing-god/thinking-sphinx/commit/8b2fb23a37cab51d2d6e1659cfad3e012ada655b#commitcomment-129949 -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
