Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable Explorer perf issue #3323

Closed
ronglums opened this issue Jun 11, 2019 · 9 comments
Closed

Variable Explorer perf issue #3323

ronglums opened this issue Jun 11, 2019 · 9 comments
Assignees

Comments

@ronglums
Copy link
Contributor

from survey:

When working in interactive Python, the variable refresh is quite slow. After every batch send to IPython it refreshes.

@rchiodo
Copy link
Contributor

rchiodo commented Jun 11, 2019

This should be fixed already. Do you have any more information? @IanMatthewHuff fixed this in the last release I believe.

@rchiodo
Copy link
Contributor

rchiodo commented Jun 11, 2019

Yeah this was fixed in microsoft/vscode-python#5708 which was shipped with our latest release.

@greazer
Copy link
Member

greazer commented Jun 13, 2019

We're assuming that this is fixed. If not, please enter a new issue.

@greazer greazer closed this as completed Jun 13, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 20, 2019
@rchiodo
Copy link
Contributor

rchiodo commented Dec 10, 2019

Here's some code that repros the problem:

# %%
i = 0

#%%
%%time
exec("var{}=[{} ** 10 % 17 for l in range(100000)]".format(i, i))
i = i + 1

Execute the first cell.
Execute the second cell like 100 times.

Open the variable explorer
Execute the second cell.

It will take 4 or 5 seconds for the cell to finish executing.

@rchiodo rchiodo reopened this Dec 10, 2019
@rchiodo
Copy link
Contributor

rchiodo commented Dec 10, 2019

@rchiodo rchiodo self-assigned this Jan 9, 2020
@rchiodo
Copy link
Contributor

rchiodo commented Jan 10, 2020

3 different ideas:

  1. Modify the debugger to support an eval that gets us this list and allows us to return data in chunks
  2. Modify our python code to return all of the data needed for one screen worth
  3. Modify our python code to return just the list of variables, use JMP 'inspect_request' to return data shown above.

@rchiodo
Copy link
Contributor

rchiodo commented Jan 10, 2020

Pros/Cons of each

Idea Pros Cons
Debugger Outside execution path (async) Python specific
Already does this sort of thing Can be slow too
Remote not working yet
Python Code Quickest to get working Still python only
Execution based (not async)
Jupyter Hybrid Should be portable to other languages
Might be async with execution?

@rchiodo
Copy link
Contributor

rchiodo commented Jan 14, 2020

Here's an even better test:

for i in range(1000):
    exec("var{}=[{} ** 10 % 17 for l in range(100000)]".format(i, i))

Creates 1000 lists with 10000 items in each.

@IanMatthewHuff IanMatthewHuff self-assigned this Jan 23, 2020
@IanMatthewHuff
Copy link
Member

There was a bit of a regression that I filed for #2382, but overall looks good. Validated.

@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants