Skip to content

reloading much slower after 2.1 upgrade in development mode for a larger code base and about 25 active admin entities #5787

@koenhandekyn

Description

@koenhandekyn

Expected behavior

We were hoping the release 2 would bring some reload performance improvements in development mode.

Actual behavior

Reload performance (after touching some class in development mode) has become extremely slow. Strange enough enough, initial load is still about the same speed.

Context

  • rails 5.2.x
  • ruby 2.6.x
  • tested on 2 mac's : i5 / 16gb ram

analysis

from the logs it seems that active admin now somehow triggers a multitude of the same class reloads, below just an extract of one request log that appears to trigger class reloading of the same classes multiple times (and the amount of times seems to be increasing per request)

/Users/koen/Personal/allcrux/app/admin/customer.rb:66: warning: already initialized constant BOOTSWATCH_V3
/Users/koen/Personal/allcrux/app/admin/customer.rb:66: warning: previous definition of BOOTSWATCH_V3 was here
/Users/koen/Personal/allcrux/app/admin/user.rb:7: warning: already initialized constant RANKDIR
/Users/koen/Personal/allcrux/app/admin/user.rb:7: warning: previous definition of RANKDIR was here
/Users/koen/Personal/allcrux/app/admin/customer.rb:66: warning: already initialized constant BOOTSWATCH_V3
/Users/koen/Personal/allcrux/app/admin/customer.rb:66: warning: previous definition of BOOTSWATCH_V3 was here
/Users/koen/Personal/allcrux/app/admin/user.rb:7: warning: already initialized constant RANKDIR
/Users/koen/Personal/allcrux/app/admin/user.rb:7: warning: previous definition of RANKDIR was here
/Users/koen/Personal/allcrux/app/admin/customer.rb:66: warning: already initialized constant BOOTSWATCH_V3
/Users/koen/Personal/allcrux/app/admin/customer.rb:66: warning: previous definition of BOOTSWATCH_V3 was here
/Users/koen/Personal/allcrux/app/admin/user.rb:7: warning: already initialized constant RANKDIR
/Users/koen/Personal/allcrux/app/admin/user.rb:7: warning: previous definition of RANKDIR was here
/Users/koen/Personal/allcrux/app/admin/customer.rb:66: warning: already initialized constant BOOTSWATCH_V3
/Users/koen/Personal/allcrux/app/admin/customer.rb:66: warning: previous definition of BOOTSWATCH_V3 was here
/Users/koen/Personal/allcrux/app/admin/user.rb:7: warning: already initialized constant RANKDIR
/Users/koen/Personal/allcrux/app/admin/user.rb:7: warning: previous definition of RANKDIR was here
/Users/koen/Personal/allcrux/app/admin/customer.rb:66: warning: already initialized constant BOOTSWATCH_V3
/Users/koen/Personal/allcrux/app/admin/customer.rb:66: warning: previous definition of BOOTSWATCH_V3 was here
/Users/koen/Personal/allcrux/app/admin/user.rb:7: warning: already initialized constant RANKDIR
/Users/koen/Personal/allcrux/app/admin/user.rb:7: warning: previous definition of RANKDIR was here
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions