-
Notifications
You must be signed in to change notification settings - Fork 11
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
Performance issue with lots of dynamic fields #21
Comments
@jmalley Did you fix this issue ? |
I don't believe so. I gave up and jacked up the memory craft is allowed to use. It's still slow, but I've gotten no timeout reports from the users at least. I'm also using an older version of this plugin with craft 2 so there may be another solution for the current plugin version. |
@jmalley Okay thanks, I got a similar issue. I will keep updating if I found a good/better solution. |
Does it work for you guys to cache the code? Like this:
|
I end up using a custom php cache solution so I can clear it on Event by Craft and exposed it with a twig variable. But I suppose it will work with this cache tag also ! |
That seemed to make a very noticeable difference, thank you! Is that just saving the dropdown values for future matrices after the first db request? |
It's saving the dropdown-data template on the first request and re-using it at the next ones. I think there should be a clear-cache-plugin for named caches though, so that caches/named caches can be c;leared on save events. Maybe I'll look into that in a short while. |
Ah makes sense. So I only need to cache it on the first instance of that dropdown in a page? Let me know what you find out about the cache clearing if you don't mind. Thanks again. |
I have a matrix with a dynamic dropdown that pulls a large number of globals. It works fine until the user adds a lot of matrix blocks that all have this field in it, at which point the page is slow to load and times out frequently. It's going to the database a hundred times, presumably. Here's my code:
What would be the best strategy for only loading this dropdown dynamically for the first block, and then displaying a cached or copied version of the dropdown for all the subsequent blocks. Is this even possible? Am I thinking about this problem in the right way?
The text was updated successfully, but these errors were encountered: