Child pages
  • [unit configs] Scan only "units" folder for unit configs [5.3.0-B1]
Skip to end of metadata
Go to start of metadata

The "unit" concept is what allows to keep In-Portal modular and reusable. The units are located in the "units" folder of each module (including "core" module). Code in fact tells different story:

  1. the "/core/kernel/nparser/nparser_config.php" and "/core/kernel/utility/formatters/formatters_config.php" are located outside "/core/units" folder

  2. the whole module folder (including "core" module) is scanned for units, instead of it's "units" sub-folder

This results in performance hit for large modules (100 and more units or lots of other files, e.g. templates) 

Solution

  1. both mentioned config files can be safely deleted, because in In-Portal 5.3.x+ versions there is no need to create unit configs just to inform In-Portal about each class location on filesystem
  2. the "kUnitConfigReader::includeConfigFiles" needs to adjusted to:
    1. scan "/core/units" instead of "/core" folder
    2. scan each module "/modules/{module_name}/units" folder instead of just all sub-folders in "/modules" folder

Related Tasks