Reputation: 1
I am using Rails 5.1.4, Ruby 2.5.1, and ActiveAdmin 1.2.1. My application has around 400 ActiveAdmin resource files, which is causing performance issues. The admin panel loads very slowly, taking 20-30 seconds per page.
If I remove half of the admin files, the application runs smoothly.
Even a simple dashboard page (with nothing inside) takes 20-30 seconds to load:
# app/admin/dashboard.rb
ActiveAdmin.register_page "Dashboard" do
menu priority: 1, label: proc { I18n.t("active_admin.dashboard") }
end
I noticed that rendering this file takes 10-12 seconds:
/home/ubuntu/.rvm/gems/ruby-2.5.1/gems/activeadmin-1.2.1/app/views/active_admin/page/index.html.arb
After all actions in ApplicationController
have been processed and before rendering begins, something takes around 10 seconds to execute.
I tried the following to diagnose and improve the performance:
Checked the logs, but they don’t show anything useful before the delay.
Removed half of the admin files, which significantly improves performance.
Verified that the delay happens before rendering starts, which suggests something is processing before the logs show controller actions.
I expected that ActiveAdmin would handle a large number of admin files efficiently. However, with ~400 admin files, it takes 20-30 seconds per page, even for simple pages like the dashboard. When I reduce the number of admin files, the application runs smoothly.
I'm trying to find out why this slowdown occurs and how I can optimize ActiveAdmin for better performance.
Upvotes: 0
Views: 26