-
Notifications
You must be signed in to change notification settings - Fork 111
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
v6 - Performance issues when loading treeview #772
Comments
Hi @AljosaB thanks for the report. It's been a few years since we initially architected this solution, but if I had to do it again, I would probably entirely avoid touching versioned table as much as possible. The queries for versioned table (whether joins / subqueries) have always been reasonably slow and inefficient in silverstripe, the problem being compounded with the way that fluent added its own layer of complexity. This problem normally doesn't manifest in sites until the versioned / versioned_localised table gets to a certain size, by which time the system is already well in production. The immediate advice i would give you is to look at trimming your versioned tables as much as you can. Can you give me an idea for how many rows you are currently querying to get 12s query times? In the mid term, maybe we can look at some small tweaks to fluent to make it less dependant on those slow queries. Another option is to try fluent v5. I personally don't use 6, since the last silverstripe fluent project I touched was before 6 was released, and it has a lot less integration with the newer silverstripe versioning (e.g. versioned admin). In the long term, migrate from silverstripe + fluent. I have toyed with the idea of writing a fluent module for laravel nova. :) |
Thank you for the response and all the advice! Here is my table record count: SiteTree_Localised_Versions - 1,956,971 We use Lumberjack module (https://github.com/silverstripe/silverstripe-lumberjack) a lot, that's why these table are quite big. Let me know what kind of tweaks you come up with, and I'll try to trim versions tables a little bit. |
Yes those numbers are very similar to another project I had a while back (millions of rows), where trimming the row count automatically gave a huge performance boost. Why not try something like https://github.com/axllent/silverstripe-version-truncator (you may need to tweak it for localised_versions).
I'd probably agree with that. I'd have to review that code to check why it's there and see if it can be deferred / removed. |
Hi, any update on this? We're still experiencing this issue. |
Hi @t3hn0 the best recommendation I have is to downgrade to fluent 5. Fluent 6 was created as a new major version to support some of the versioning features in later minor versions of silverstripe 4.x. See #639 for notes. Personally I dislike how much silverstripe has come to rely on versioned, so I still use fluent 5.x in my personal projects. You might not have all the latest features but you'll get better performance. |
We recently upgraded Fluent to v6. Our site has a lot of pages. When opening CMS (/admin), page tree gets loaded (/admin/pages/treeview) and it takes like 30 seconds to finish (was 3s on v5) and sometimes it even hits time-out.
Trace
Queries
FluentVersionedExtension->getCurrentVersionNumbers() gets called 2 times generating running 2 queries
Each of these 2 queries takes around 12s to finish, ~25s together, which makes CMS too slow.
The text was updated successfully, but these errors were encountered: