Welcome Guest, Not a member yet? Register   Sign In
Shield's autoloading performance
#1

(This post was last modified: 09-26-2023, 03:01 AM by Muzikant.)

I am starting with Shield. After successful installation (Composer and Spark) I realized, that Auth helper is autoloaded everywhere. I need it only in admin panel, nowhere else. The documentation is saying, it is autoloaded by Composer.

  1. Is it possible to load Shield only where I want it?
  2. Does autoloading in Composer have impact on performance as level 1 optimization is enabled by default?

I realized, that Shield's dependency Settings library is always sending database request for settings table, even if I am not using neither the Shield or the Settings library. This behavior is unwanted for me. (Edit: It was my mistake. It is not doing this.)

CodeIgniter 3 and less was great, because it was not loading anything "for me" until I specifically asked for it. I know, Shield is not essential part of CI, but this behavior looks like Laravel style, which is leading to bloating software, which I really do not want and I am suspicious on CI too now as Lonnie is an active member of the community. I really hope CodeIgniter is not heading this way, because why should I use Laravel style framework, if I can use Laravel directly? And why should I use Shield, if it is doing stuff "for me", which I really do not want?
Reply


Messages In This Thread
Shield's autoloading performance - by Muzikant - 09-25-2023, 11:57 PM
RE: Shield's autoloading performance - by kenjis - 09-26-2023, 01:36 AM
RE: Shield's autoloading performance - by kenjis - 09-29-2023, 04:00 AM
RE: Shield's autoloading performance - by kenjis - 10-02-2023, 03:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB