vscode-dvc icon indicating copy to clipboard operation
vscode-dvc copied to clipboard

Plot updates are slow and are fetching information that is not needed

Open shcheklein opened this issue 3 years ago • 1 comments

(video is too large to embed, sorry about that)

https://www.dropbox.com/s/1nhipdskbnzchyn/Screen%20Recording%202022-10-12%20at%202.19.43%20PM.mov?dl=0

Two things:

  • When we start a new experiment it keeps showing old plots for a while. Can we grey out / force remove if we know that update is coming? (need to do some research there, e.g. resume an experiment mode means that we should just continue a line in the same color)
  • Plots update command takes too much time
  • Plots update command runs with extra arguments for no reason. When workspace is selected it runs with:
dvc plots diff workspace 7a43153 46bd8b3 9a83545 -o .dvc/tmp/plots --split --json - COMPLETED (100245ms)

where 7a43153, 46bd8b3, 9a83545 the HEAD of the branch and two previous commits.

shcheklein avatar Oct 12 '22 23:10 shcheklein

The last item can be narrowed down to this:

https://github.com/iterative/vscode-dvc/blob/c83e76367f7ea3159acd9adfc5474b33b7269a01/extension/src/plots/model/index.ts#L204-L206

and this PR:

https://github.com/iterative/vscode-dvc/pull/1949/files

One the issue is fixed now.

Btw, using the workspace revision alone gives me an error (I would expect this, since workspace is not an actual Git revision):

plots,diff,workspace,-o,.dvc/tmp/plots,--split,--json failed with ERROR: unknown Git revision 'workspace' retrying...

shcheklein avatar Oct 13 '22 02:10 shcheklein

When we start a new experiment it keeps showing old plots for a while. Can we grey out / force remove if we know that update is coming? (need to do some research there, e.g. resume an experiment mode means that we should just continue a line in the same color) Plots update command takes too much time

This should all be fixed when we come back around to do errors.

mattseddon avatar Oct 19 '22 05:10 mattseddon

This should all be fixed when we come back around to do errors.

@mattseddon could you clarify please? Not sure how this is related to the errors tbh.

shcheklein avatar Oct 19 '22 05:10 shcheklein

This should all be fixed when we come back around to do errors.

@mattseddon could you clarify please? Not sure how this is related to the errors tbh.

We need to redesign the way that we are interacting with the CLI to get the plots data in order to get errors. When we do this we can start to optimise the code.

mattseddon avatar Oct 19 '22 06:10 mattseddon

I think those things are related, but probably we can reset things on our end also forcefully when new experiments starts in the workspace to mitigate this?

shcheklein avatar Oct 20 '22 01:10 shcheklein

One more complaint by @alex000kim https://www.loom.com/share/9923ce77de6f4d11bc0aca03387ff438 ... I'm experiencing delays usually as well.

Also related with some investigation - https://github.com/iterative/vscode-dvc-demo/pull/7#issuecomment-1315854742

shcheklein avatar Nov 17 '22 04:11 shcheklein

Related to https://github.com/iterative/dvc/issues/8786

mattseddon avatar Mar 08 '23 08:03 mattseddon

@mattseddon, please share --cprofile-dump of a new release of dvc. I'll take a look.

skshetry avatar Mar 15 '23 14:03 skshetry

Closing this as per https://github.com/iterative/dvc/issues/8786#issuecomment-1474498465

mattseddon avatar Mar 20 '23 04:03 mattseddon