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

Opening a workspace may take long time #270

Closed
forman opened this issue Jun 29, 2017 · 1 comment
Closed

Opening a workspace may take long time #270

forman opened this issue Jun 29, 2017 · 1 comment

Comments

@forman
Copy link
Member

forman commented Jun 29, 2017

Actual behavior

A user keeps adding operation steps to a current workflow. Each new step is executed immediately which may take considerable compute time. When user saves workspace, then opens it again, all workflow steps are executed. The overall time to load the workspace is the sum of each operation step's execution time.

Expected behavior

Opening a workspace should be fast. Open action may be split into two phases: (1) actual open, (2) workflow execution. Execution may be accelerated by using a file cache for intermediate/final results.

Steps to reproduce

E.g. try in CLI or GUI use case 9, save it and reopen it:

  1. keeps adding operation steps to current workflow
  2. saves the workflow as
  3. open workflow
  4. ==> takes long time to open, no progress shown by progress bar(!)

Specifications

0.8.0rc7.dev1

@forman forman added this to the IPM6 milestone Jun 29, 2017
@forman forman self-assigned this Jun 29, 2017
@forman
Copy link
Member Author

forman commented Jun 29, 2017

Implementation ideas

Split open action into two phases

  1. Opening the workspace and all steps (instantaneous)
  2. Executing the workflow (may take some time).

For the latter, show step-by-step progress and allow for cancellation. Cancellation
leave some remaining steps without resources, but that should be fine. If some other
step requires the resource, computation should be triggered automatically.
The disadvantage of this approach is that users may observe unexpected delays / unresponsive UI,
e.g. when visualizing a result. Therefore, resources should be in one of three states
NOT YET COMPUTED, COMPUTING, COMPUTED, IN ERROR. The state should be clearly indicated, e.g. in the GUI.

Options to speed up loading of resources by using a per-workspace file cache:

  • When saving a workspace, write out an xarray.Dataset resource named <res> from resource cache
    to workspace path file resources/<res>.nc.
  • When opening a workspace, read in all resources/<res>.nc and put an xarray.Dataset resource
    named <res> into resource cache.
  • Behavior may apply only to resources for which a cache property has been set to True.

Note: This implementation idea must be carefully assessed also in the light of #246.

@forman forman added the ws label Jul 5, 2017
@forman forman closed this as completed in 627dd44 Jul 10, 2017
forman added a commit to CCI-Tools/cate-desktop that referenced this issue Jul 10, 2017
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

1 participant