I'm developing a website and it is in its starting phase. At a point I am stuck to load a Plugin in controller's action. I know there is a way to load a plugin in bootstrap.php. It works but it increases my page load time. I am afraid that it is in its starting phase, what happen if it will go on live or when code increase ? The main drawback to load a plugin in bootstrap.php is, it loads the plugin for each and every request. But I need to load this plugin only in controller's action or controller. Why I load this plugin on each controller if it will be not used ? Is there any way to load a plugin in controller's action ?
A big thanks in advance...
Loading plugin in bootstrap would not load it every controller, it should not increase load time unless plugin is used. If a plugin is causing site to be slow , you will need to fix the plugin itself.