Hi Dmitrij

There's been a fix recently (in either 1.3.15 or 1.3.16) which should make this 
lag only happen on the first search request if you're using Mongrel - TS is 
slowly getting better with multi-threaded setups. It may help things in 
Passenger too - I'm not sure.

However, that won't do anything for the development environment, because Rails 
reloads the app context every time. I've considered allowing users to manually 
set which models have indexes - feel free to submit a ticket and I'll try to 
get around to it at some point.

Hope this adds some clarity to the situation.

-- 
Pat

On 02/03/2010, at 9:12 PM, Dmitrij Smalko wrote:

> Completed in 1809ms (View: 376, DB: 6)
> 
> On 2 мар, 11:03, Dmitrij Smalko <[email protected]> wrote:
>> Hi,
>> 
>> TS version is 1.3.14.
>> I have 5 indexed models of 34 total. It would be nice if we could
>> instead of scanning files - to indicate them in a initializer.
>> Like: ThinkingSphinx.indexed_models = [Comment, Post, User]
>> 
>> On 2 ÜÐà, 01:23, Pat Allan <[email protected]> wrote:
>> 
>>> Hi Dmitrij
>> 
>>> Thinking Sphinx needs to know about all models that the application has 
>>> when searching - so it can knows what objects to translate Sphinx results 
>>> back into. So there's not really a way you can avoid this step. The more 
>>> models in an app (and the more complex those models are), the slower this 
>>> loading will be, so I'm guessing you've got a fair few models.
>> 
>>> Sorry, not much we can do about this - I've already got TS smart enough to 
>>> only load models when it needs them (instead on every single web request).
>> 
>>> Are you using the latest TS? I highly recommend upgrading (there's been a 
>>> multi-threading fix recently).
>> 
>>> --
>>> Pat
>> 
>>> On 02/03/2010, at 4:52 AM, Dmitrij Smalko wrote:
>> 
>>>> Hello,
>> 
>>>> In my application define_index methods in models takes > 1s to load.
>>>> It seems that the problem is in the method
>>>> "load_models" in file thinking-sphinx-1.3.16\lib\thinking_sphinx
>>>> \context.rb
>> 
>>>> --
>>>> 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 
>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en.
>> 
>> 
> 
> -- 
> 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.
> 

-- 
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.

Reply via email to