Skip to content

Huge CPU and Memory consumption caused by design problems #4952

Closed

Description

@suiahae

Issue Type: Bug

Some questions about the python plugin encountered when building python library indexes

I strongly hope that the python plugin does not read the information into memory in real time when creating the python library index, but instead saves the index file in order to speed up the time and reduce memory overhead.

The python library is really too big. Sometimes I have to wait a few minutes for writing a small amount of code.

Extension version: 2019.3.6139
VS Code version: Code 1.32.3 (a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4, 2019-03-14T23:43:35.476Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2712)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 15.86GB (8.60GB free)
Process Argv
Screen Reader no
VM 46%

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Mar 27, 2019
  2. changed the title [-]Huge CPU and Memory consumption caused by design problems soared[/-] [+]Huge CPU and Memory consumption caused by design problems[/+] on Mar 27, 2019
  3. algo99 commented on Mar 27, 2019

    @algo99

    I can confirm, on Windows 10.

    After update (yesterday) of Python Language Server and/or vscode_python extension VSCode not more usable. See the disk I/O and memory consumption:

    vscode_python_language_server

    The extension proceeds after VSCode start:

    Analyzing in background, 6879 items left ...

    and this process does not stop.
    I tried several times to restart VSCode, but it does not help.

  4. algo99 commented on Mar 27, 2019

    @algo99

    Just noted in Python output pane:

    ...
    [Info  - 09:17:10] Microsoft Python Language Server version 0.2.31.0
    [Info  - 09:17:10] Initializing for c:\3rd\WinPython\python-3.7.2.amd64\python.exe
    Traceback (most recent call last):
      File "C:\Users\zkr\.vscode\extensions\ms-python.python-2019.3.6139\languageServer.0.2.31\scrape_module.py", line 1497, in <module>
        state.collect_second_level_members()
      File "C:\Users\zkr\.vscode\extensions\ms-python.python-2019.3.6139\languageServer.0.2.31\scrape_module.py", line 944, in collect_second_level_members
        self._collect_members(mi.value, mi.members, substitutes, mi)
      File "C:\Users\zkr\.vscode\extensions\ms-python.python-2019.3.6139\languageServer.0.2.31\scrape_module.py", line 958, in _collect_members
        raise RuntimeError("failed to import module")
    RuntimeError: failed to import module
    Traceback (most recent call last):
      File "C:\Users\zkr\.vscode\extensions\ms-python.python-2019.3.6139\languageServer.0.2.31\scrape_module.py", line 1497, in <module>
        state.collect_second_level_members()
      File "C:\Users\zkr\.vscode\extensions\ms-python.python-2019.3.6139\languageServer.0.2.31\scrape_module.py", line 944, in collect_second_level_members
        self._collect_members(mi.value, mi.members, substitutes, mi)
      File "C:\Users\zkr\.vscode\extensions\ms-python.python-2019.3.6139\languageServer.0.2.31\scrape_module.py", line 958, in _collect_members
        raise RuntimeError("failed to import module")
    RuntimeError: failed to import module
    Traceback (most recent call last):
      File "C:\Users\zkr\.vscode\extensions\ms-python.python-2019.3.6139\languageServer.0.2.31\scrape_module.py", line 1489, in <module>
        state.initial_import(sys.argv[2])
      File "C:\Users\zkr\.vscode\extensions\ms-python.python-2019.3.6139\languageServer.0.2.31\scrape_module.py", line 872, in initial_import
        mod = __import__(self.module_name)
      File "c:\3rd\winpython\python-3.7.2.amd64\lib\site-packages\cvxopt\__init__.py", line 50, in <module>
        import cvxopt.base
    ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
    
  5. dilzeem commented on Mar 27, 2019

    @dilzeem

    I am also getting the same issue as well on Windows 10.

    It only happens once I start debugging some code.
    It renders VScode unusable.

  6. suiahae commented on Mar 27, 2019

    @suiahae
    Author

    It only happens when the python plugin loads the python library, which requires a lot of CPU and memory. And these information that is loaded into memory is estimated to be used for IntelliCode.

  7. ray306 commented on Mar 27, 2019

    @ray306

    The same problem happens today. I think it's a bug of new Python plugin just released yesterday (March 26).

  8. dilzeem commented on Mar 27, 2019

    @dilzeem

    Possibly a duplicate of of this in the python language server:

    microsoft/python-language-server#450

  9. suiahae commented on Mar 27, 2019

    @suiahae
    Author

    Possibly a duplicate of of this in the python language server:

    Microsoft/python-language-server#450

    I also think that the issues area of the python plugin has a large part of similar content related to such a bug. It seems that this bug is very disturbing programming and needs to be solved urgently. ;-)

  10. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Mar 27, 2019
  11. gramster commented on Mar 27, 2019

    @gramster

    Please add further reports and repro cases to microsoft/python-language-server#832

  12. nbara commented on Mar 28, 2019

    @nbara

    Can you kindly provide instructions to downgrade extension/language-server version until this is fixed ? This issue makes VSCode completely unusable for me as it is...

  13. gramster commented on Mar 28, 2019

    @gramster
  14. suiahae commented on Mar 28, 2019

    @suiahae
    Author

    Thanks. The temporary solution you provided perfectly solved my problem. The huge memory consumption disappeared when I switched to jedi by setting jediEnabled to true in the settings.

    So, I think the “culprit” should be Microsoft.Python.LanguageServer.exe(or the design flaw of Microsoft.Python.LanguageServer.exe).

    And I have a question that does Microsoft's analysis tool be added or is it set to be enabled by default in the new version in March?

    You can switch to jedi by setting jediEnabled to true in the settings.
    …
    On Thu, Mar 28, 2019 at 2:41 AM Nicolas Barascud @.***> wrote: Can you kindly provide instructions to downgrade extension/language-server version until this is fixed ? This issue makes VSCode completely unusable for me as it is... — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#4952 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AConiM84H37g6mJ2jYG3bd_3O1IZNwWZks5vbI4xgaJpZM4cM9GU .

  15. DonJayamanne commented on Apr 1, 2019

    @DonJayamanne
  16. locked and limited conversation to collaborators on Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions