Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2011 at 05:37 UTC
Updated:
27 May 2012 at 21:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
drunken monkeyYes,
search_api_views_views_data()can take quite some time – but Views caches the data, so it should only be called on cache rebuilds. If it's called on every page, this is most likely no bug in this module, but either one in Views or a configuration error. Did you maybe disable caching atadmin/structure/views/settings/advanced, or in some way clear the cache on every page load.Otherwise, investigate from where this is called and why, and maybe post to the Views issue queue.
Comment #2
bigsyke commentedthank you, I will investigate this.
Edit: That's exactly what it was, shame on me. The disable views cache was checked.
Thanks again.
Comment #3
drunken monkeyComment #4
steven jones commentedThis is causing a huge issue for us, this function is taking around 25 seconds! to run. I'm going to look into what's taking so long.
Comment #5
steven jones commentedOkay, firstly apologies for rolling this against e68bfc31363cb35fcf64ff27bbf2f53e06caf115 and not HEAD. Secondly I don't understand what the code is trying to do, and specifically what it's exposing to views, but essentially it looks like its trying to expose as much as it can to views.
We've added a little check to see if you've marked the field as needing indexing before descending into the item, this makes the function about 2000% faster in our setup (four indexes, lots of fields).
I suspect that this isn't the way you'd want to do this, however the performance of this function is pretty awful, and cache wipes on a busy site could cause huge load on a server, as the views data cache isn't built in a locked step, i.e. 20 requests will queue up 20 views data builds if its not in the cache.
Comment #6
drunken monkeyWill probably be fixed by #1231512: Use real Relationships instead of level magic in Views integration, please test the patch there.
Comment #7
vladady commentedHello,
Does views cache work for you?
With views cache activated the facets don't appear.
This is after it is corrected a little bit to start working.
Comment #8
drunken monkeyComment #9.0
(not verified) commentedcorrect spelling