<#7310 refactor: Make applicable core classes lazy...
# meltano-repo-activity
g
#7310 refactor: Make applicable core classes lazy cached properties of
Project
or
ProjectPlugin
Issue created by WillDaSilva Following the direction taken in: • #7273 These changes ought to simplify the code, improve performance, reduce maintenance burden, simplify future updates/usage, and move us towards an overall better model for representing and manipulation Meltano projects. An instance of each of classes may be suitable as lazy cached properties of `Project`: •
ConfigService
•
ELTContextBuilder
•
EnvironmentService
•
LockedDefinitionService
•
Manifest
•
MeltanoHubService
•
MeltanoInvoker
•
PluginDiscoveryService
•
PluginInstallService
•
PluginLockService
•
PluginRemoveService
•
ProjectAddService
•
ProjectFiles
•
ProjectPluginsService
•
ProjectSettingsService
•
ScheduleService
•
SelectService
•
StateService
•
TaskSetsService
•
Tracker
•
TransformAddService
•
VenvService
The project should also have a DB session as a lazy cached property. See
src/meltano/core/db.py::project_engine
. At a glance, it appears that the way we use it causes the first session created to be cached, and reused from there on out. The project can probably also update some of its existing properties to be cached properties, such as
dotenv_env
. An instance of each of classes may be suitable as lazy cached properties of `ProjectPlugin`: •
DbRemoveManager
•
InstallationRemoveManager
•
LockedDefinitionRemoveManager
•
MeltanoYmlRemoveManager
•
PluginConfigService
•
PluginInvoker
•
PluginLock
•
PluginSettingsService
While we're at it, the 4
RemoveManager
classes can probably be simplified into one class (e.g. the existing abstract base class
PluginLocationRemoveManager
) with location-based dispatching to one of 4 remove methods. meltano/meltano