Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

CLI (and WebAPI) take too long to launch #58

Closed
forman opened this issue Sep 30, 2016 · 4 comments
Closed

CLI (and WebAPI) take too long to launch #58

forman opened this issue Sep 30, 2016 · 4 comments
Assignees
Milestone

Comments

@forman
Copy link
Member

forman commented Sep 30, 2016

Both the CLI (and the WebAPI service) import all package dependencies the CCI Toolbox has. This is because all operations in ect.ops are also imported which import packages such as cartopy, basemap, matplotlib, pandas, xarray which again import their own dependencies.

Both the CLI (and possibly the WebAPI service) must be modularized so that individual commands/actions have their own modules which will import only the desired packages. This is more important for the CLI, because the WebAPI is usually launched only once and remains in memory as a demon process. However, unit-level tests that require starting/stopping the service currently execute very slow due to the reasons stated above.

@forman forman added this to the v2.0 milestone Sep 30, 2016
@forman forman modified the milestones: IPM5, IPM3 Feb 7, 2017
@forman forman mentioned this issue May 19, 2017
@forman forman modified the milestones: IPM6, IPM5 Jul 3, 2017
@forman forman self-assigned this Jul 5, 2017
@mzuehlke
Copy link
Collaborator

It seems at least in some part to be a problem of python itself. The startup time has more than doubled between python 2 and python 3.

An interesting article (no solution included 😞 ):
Reducing Python's startup time

@forman
Copy link
Member Author

forman commented Sep 13, 2017

Let's refactor out the web-service instantiation from CLI unit-tests and use a mock instead.

@forman forman modified the milestones: IPM6, IRM7 Sep 21, 2017
@forman forman mentioned this issue Oct 29, 2017
2 tasks
@forman
Copy link
Member Author

forman commented Oct 29, 2017

Started this because of #465

@forman
Copy link
Member Author

forman commented Dec 11, 2017

Closing this, as there is currently no much more we can (easily) do.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants