Skip to content

High CPU and network usage when working on a network share. 10 seconds delay when pressing F12 #7064

Open
@Raukgorth

Description

@Raukgorth

Environment data

  • Pylance version: 2025.3.2
  • OS and version:
    Version: 1.98.2 (system setup)
    Commit: ddc367ed5c8936efe395cffeec279b04ffd7db78
    Date: 2025-03-12T13:32:45.399Z
    Electron: 34.2.0
    ElectronBuildId: 11161602
    Chromium: 132.0.6834.196
    Node.js: 20.18.2
    V8: 13.2.152.36-electron.0
    OS: Windows_NT x64 10.0.19045
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.13.2

Code Snippet

init.py

main.py

import asyncio

async def main():  
  await asyncio.sleep(1)

if __name__ == "__main__":
  asyncio.run(main())
  print("Main task done.")

Repro Steps

  1. Create a blank network share on a SMB
  2. Start a new project in that share
  3. Add a local git repo and commit a change

Expected behavior

  1. Minimal CPU and network usage
  2. Pylance taking less than 10 seconds when pressing F12

Actual behavior

  1. BUG >>> Extensive network traffic and CPU usage
  2. BUG >>> Going to declaration in another open file takes about 10 seconds
    XXX

Logs

Full log attached, about 5 megabytes, doesn't fit here
The bit at the end is me disconnecting Ethernet to stop the log as I was unable to copy it.

This is the buggy bit, repeating endlessly:

2025-03-24 13:16:39.222 [info] [Info  - 1:16:39 PM] (14668) Heap stats: total_memory_size=24312MB, total_free_size=12186MB, total_heap_size=137MB, used_heap_size=133MB, cross_worker_used_heap_size=133MB, total_physical_size=137MB, total_available_size=3962MB, heap_size_limit=4096MB
2025-03-24 13:16:39.222 [info] (14668) [BG(1)] indexing: file://bananwypelnionysmietana/bot/main.py [found 2] (0ms)
2025-03-24 13:16:39.222 [info] (14668) Workspace indexing done: file://bananwypelnionysmietana/bot/main.py
2025-03-24 13:16:39.223 [info] (14668) [BG(1)] indexing: file://bananwypelnionysmietana/bot/test.py [found 7] (0ms)
2025-03-24 13:16:39.223 [info] (14668) Workspace indexing done: file://bananwypelnionysmietana/bot/test.py
2025-03-24 13:16:39.683 [info] [Info  - 1:16:39 PM] (14668) SourceFile: Received fs event 'change' for path '\\BananWypelnionySmietana\bot\__init__.py'
2025-03-24 13:16:39.695 [info] [Info  - 1:16:39 PM] (14668) SourceFile: Received fs event 'change' for path '\\BananWypelnionySmietana\bot\main.py'
2025-03-24 13:16:39.710 [info] [Info  - 1:16:39 PM] (14668) SourceFile: Received fs event 'change' for path '\\BananWypelnionySmietana\bot\test.py'
2025-03-24 13:16:39.726 [info] (14668) [BG(1)] indexing: file://bananwypelnionysmietana/bot/__init__.py [found 0] (1ms)
2025-03-24 13:16:39.727 [info] (14668) Workspace indexing done: file://bananwypelnionysmietana/bot/__init__.py
2025-03-24 13:16:39.727 [info] (14668) [BG(1)] indexing: file://bananwypelnionysmietana/bot/main.py [found 2] (0ms)
2025-03-24 13:16:39.727 [info] (14668) Workspace indexing done: file://bananwypelnionysmietana/bot/main.py
2025-03-24 13:16:39.727 [info] (14668) [BG(1)] indexing: file://bananwypelnionysmietana/bot/test.py [found 7] (0ms)
2025-03-24 13:16:39.727 [info] (14668) Workspace indexing done: file://bananwypelnionysmietana/bot/test.py
2025-03-24 13:16:40.187 [info] [Info  - 1:16:40 PM] (14668) SourceFile: Received fs event 'change' for path '\\BananWypelnionySmietana\bot\__init__.py'
2025-03-24 13:16:40.199 [info] [Info  - 1:16:40 PM] (14668) SourceFile: Received fs event 'change' for path '\\BananWypelnionySmietana\bot\main.py'
2025-03-24 13:16:40.217 [info] [Info  - 1:16:40 PM] (14668) SourceFile: Received fs event 'change' for path '\\BananWypelnionySmietana\bot\test.py'
2025-03-24 13:16:40.228 [info] (14668) [BG(1)] indexing: file://bananwypelnionysmietana/bot/__init__.py [found 0] (0ms)
2025-03-24 13:16:40.229 [info] (14668) Workspace indexing done: file://bananwypelnionysmietana/bot/__init__.py
2025-03-24 13:16:40.229 [info] [Info  - 1:16:40 PM] (14668) Heap stats: total_memory_size=24312MB, total_free_size=12159MB, total_heap_size=137MB, used_heap_size=133MB, cross_worker_used_heap_size=133MB, total_physical_size=137MB, total_available_size=3962MB, heap_size_limit=4096MB

pylance.txt

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions