Open kunzig940 opened 4 years ago
sorting/filtering in the background.
exactly
See https://github.com/jbox-web/ajax-datatables-rails/blob/master/lib/ajax-datatables-rails/base.rb#L32
Is there a way to bypass the additional calls cleanly by any chance? I have the data exactly how I need it on the first fetch. Thanks for the gem it's kept things a lot cleaner.
The main issue is that I call elasticsearch on AWS in get_raw_records so calling it 3 times slows things down considerably. I'm wondering if get_raw_records should only be the initial models & joins and then the filter_records(records)
method should have the logic? Will report back.
@kunzig940, any update on this please? having the same issue.
When debugging, get_raw_records is called three times. How can I bypass such behavior? For example the logs show:
Logs:
If I return zero User records (i.e.
User.none
) it is only called twice so I'm assuming it's something to do with sorting/filtering in the background.