New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtus accounts for 45% of view rendering time for large result sets #767
Comments
solnic/virtus#287 discusses performance in Virtus, which is a little worse in Ruby 1.9, and a lot worse when loading the It is possible to use Virtus without the type coercer, but not in |
I am actually using Elasticsearch::Persistence::Repository. |
@bkazez I apologize, my mistake. I must have looked at the last comment and noticed that |
Unfortunately I'm rather new to Rails and the only solution I had was to
remove Virtus entirely. Sorry I can't be of more help right now.
…On Thu, Aug 16, 2018 at 10:29 AM, Emily S ***@***.***> wrote:
@bkazez <https://github.com/bkazez> I apologize, my mistake. I must have
looked at the last comment and noticed that Elasticsearch::Persistence::
Model was cited. Is there anything you think the elasticsearch-persistence
gem can do about this or is the performance issue with the Virtus gem
itself?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#767 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD6BXHONE733swh3SOtYd6MRNZE0BKwks5uRTuCgaJpZM4RPtkF>
.
|
@bkazez ok, I think the performance issue lies with Virtus, not with the elasticsearch-rails gems. If I'm mistaken, please let me know where you notice a bottleneck or if I can close this issue. Thanks! |
See attached performance analysis. Virtus seems to be adding a significant slowdown when processing a result set of 10k smallish documents. Note that the attached is just for rendering a single .erb.html template and does not include time spent querying es or even processing the results.
I am porting legacy code from PHP/MySQL and right now it performs much better on PHP/MySQL (~10x).
Eventually I will implement pagination using search_after, but I believe I will still have these issues. For heavy-duty use, do implementors need to simple use the client directly? I am just parsing array fields into a
<table>
and so do not require much fanciness on the part of the Rails library.The text was updated successfully, but these errors were encountered: