<@492751562872193025> When I use a limit(777) in ...
# avo-2
s
@lemon-wall-20836 When I use a limit(777) in the resolve_query_scope method, the count of that limit is displayed in the search dialog. The search is executable. Is there a best way to limit the number of items displayed on the default index screen?
l
the name of the thred is
Limit the number of items displayed on the index screen
, but I see the screenshot showing the search box
> Is there a best way to limit the number of items displayed on the default index screen? you can do that using the
?per_page
param. that will change the number of items per each page for the
Index
view
but I think I don't understand the question. sorry
can you rephrase it? why did you add a limit of 777 to the
resolve_query_scope
?
s
I thought that limiting the records on the indedx screen would speed up the first view, but I was wrong. You are right. This method did not make sense because of paging. Thank you for taking time out of your busy schedule to reply🙇‍♂️
l
so, are you encountering a slow page with Avo? is the
Index
view slow for you?
s
Yes. When there is no cache of the index screen, it seems a little slow. Also, the search seems slow. This is because the table has 3 million records.
Avo is the very best. No problems.
l
are you comfortable sharing your resource file in public?
can you please open an issue on https://avo.cool/new-issue with your resource file
maybe there's something that will catch my eye and it's a quick fix
s
I will first check around ransack and database that I implemented myself. When it still feels slow, I will check Avo's implementation and create an issue.
Thank you for your very kind reply. Japanese developers like me are supported by Avo🙌
l
just one thing I'd like to mention, is to check for n+1 queries and use the
self.includes
option
thanks for the kind words!
2 Views