question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

100% CPU with explorer and code moving files to folders

See original GitHub issue

Issue Type: Bug

I wrote a simple python script to move 15k pdf’s into a folder based on theri name. This pinned my CPU to 100% and slowed the process way down since the explorer window was trying to keep up with the changes I suspect. Running this with vscode closed only used 13% of my system and ran much faster.

from pathlib import Path
from sys import exit

root = Path(__file__).parent

for child in root.iterdir():
    if child.is_dir():
        continue

    if child.name.startswith('MRRC_'):
        continue

    if child.suffix.casefold() != '.pdf':
        continue

    folder = Path(child.name.replace(child.suffix, ""))
    folder.mkdir(exist_ok=True)
    child.rename(folder / child.name)

VS Code version: Code 1.67.1 (da15b6fd3ef856477bf6f4fb29ba1b7af717770d, 2022-05-06T12:37:03.389Z) OS version: Windows_NT x64 6.3.9600 Restricted Mode: No

System Info
Item Value
CPUs Intel® Xeon® Gold 6240 CPU @ 2.60GHz (2 x 2594)
GPU Status 2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
oop_rasterization: disabled_off
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
Load (avg) undefined
Memory (System) 8.00GB (3.86GB free)
Process Argv . --crash-reporter-id 98dd838a-6bce-406d-afd2-5fcb572467ec
Screen Reader no
VM 100%
Extensions (14)
Extension Author (truncated) Version
vscode-json and 1.5.2
EditorConfig Edi 0.16.4
vscode-diff fab 1.4.2
rainbow-csv mec 3.2.0
xml-format mik 1.1.3
python ms- 2022.8.1
vscode-pylance ms- 2022.11.10
jupyter ms- 2022.4.1021342353
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.9
vscode-fileutils sle 3.5.0
colonize vms 2.2.2
vscode-icons vsc 12.0.1
vim vsc 1.24.2
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
vsccc:30566497
pyindex848:30577860
nodejswelcome1:30587005
fc301958:30595537
2e4cg342:30596373

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bpaserocommented, Dec 9, 2022

@steveoh ok good, that window process has tooling to profile it to see where time is spend, can you follow https://github.com/Microsoft/vscode/wiki/Performance-Issues#profiling-the-renderer-process and attach?

1reaction
bpaserocommented, Dec 7, 2022

Can you follow this wiki and post the results back here to understand more about why performance is so bad for you: https://github.com/Microsoft/vscode/wiki/Performance-Issues

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

explorer.exe High CPU Usage During File Transfer
Issue: when I try to copy a "lot of file" explorer.exe reach about 40% - 70% CPU Usage for every transfer action. It...
Read more >
Top 8 Ways to Fix Windows Explorer High CPU
Fix 1: Remove Icons with No Image · Fix 2: Check the Task Manager · Fix 3: Restart the Windows Management Instrumentation Service...
Read more >
windows 10 - High CPU usage from Explorer.exe
Try running DISM and SFC. First, exit Dropbox and exit OneDrive so they are not running. Then open cmd.exe with Run as Administrator...
Read more >
Solved: Explorer.exe using large amounts of CPU until UEM
Solved: We have noticed this issue sporadically with different users. Explorer seems to max out a processor for no reason and it will...
Read more >
VSCode's renderer helper process using 100% of CPU
The vscode Code Helper (Renderer) process consumes a lot of cpu and causes a very high processor temperature, closing vscode and disabling ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found