You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently upgraded our Rails 6.1 project from v2 to v3 of Rails Admin. We are seeing performance hit as a result of the now default sidescrolling when viewing the list of records for certain models. This was not a problem previously because of the horizontal pagination. However, we are now running into memory issues because ALL the associations on the first few records are fetched from the db and loaded into memory to display in the table.
Feature request: please could you bring back the sidescroll option or similar config. I'm happy to create a PR for this if you'd like? There isn't much context in the removal commit (d51e943) as to why it was removed, so wanted to check first.
I can solve my issue by restricting the fields on the terribly performing models (I am excluding most of the has_many associations), but a universal solution would be better... Sidescrolling worked well enough to solve this! An alternative would be an option not to load associations 馃
Also let me know if there's some solution/workaround I'm missing 馃
The text was updated successfully, but these errors were encountered:
The optional sidescroll feature was removed because it adds maintenance overhead. Making it the default behavior allowed removal of conditionals and logics from the codebase, as you can see from the commit.
we are now running into memory issues because ALL the associations on the first few records are fetched from the db and loaded into memory to display in the table.
That happens, especially with has_many associations as you mentioned. My recommendation is to always use the field directive to explicitly opt-in the fields to be shown. This usually results in better usability unless the model is very simple (in your case that's not the case), as you can show only fields that are meaningful to users with friendly order.
You can also exclude all has_many fields like this, though I don't recommend much.
config.model Foo do
fields_of_type :has_many_association do
hide
end
end
Hi there 馃憢
I recently upgraded our Rails 6.1 project from v2 to v3 of Rails Admin. We are seeing performance hit as a result of the now default sidescrolling when viewing the list of records for certain models. This was not a problem previously because of the horizontal pagination. However, we are now running into memory issues because ALL the associations on the first few records are fetched from the db and loaded into memory to display in the table.
Feature request: please could you bring back the
sidescroll
option or similar config. I'm happy to create a PR for this if you'd like? There isn't much context in the removal commit (d51e943) as to why it was removed, so wanted to check first.I can solve my issue by restricting the fields on the terribly performing models (I am excluding most of the
has_many
associations), but a universal solution would be better... Sidescrolling worked well enough to solve this! An alternative would be an option not to load associations 馃Also let me know if there's some solution/workaround I'm missing 馃
The text was updated successfully, but these errors were encountered: