microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.03k stars 28.5k forks source link

slow output for while loop in c language #211108

Closed Harshit476 closed 4 months ago

Harshit476 commented 4 months ago

Type: Performance Issue

whenever i try to run whlie loop code the output is taking so much time but all the other programes are running normally i am facing problem in only while loop.

the code is that

include

int main(){ int n; printf("Enter the Number : "); scanf("%d", &n); int i=0; while(i <= n){ printf("%d\n", i); i++; } return 0; }

VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:41:02.734Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i5-12450H (12 x 2496)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.71GB (8.31GB free)| |Process Argv|--crash-reporter-id 06b4113d-474d-4c19-a444-7466c2bc36fb| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 0 131 10432 code main 0 265 2476 gpu-process 0 105 5580 shared-process 0 87 8788 fileWatcher [1] 0 101 11728 window [2] (Issue Reporter) 0 275 12096 window [1] (queforinput.c - pw c language - Visual Studio Code) 0 259 13040 extensionHost [1] 0 32 13884 c:\Users\harsh\.vscode\extensions\ms-vscode.cpptools-1.20.2-win32-x64\bin\cpptools.exe 0 11 4772 C:\Windows\system32\conhost.exe 0x4 0 3 10656 "c:\Users\harsh\.vscode\extensions\ms-vscode.cpptools-1.20.2-win32-x64\bin\cpptools.exe" 0 18 8864 c:\Users\harsh\.vscode\extensions\ms-vscode.cpptools-1.20.2-win32-x64/bin/cpptools-srv.exe 13884 {936A38D3-C4B1-4FB6-A1B2-A765BF3F65F1} 0 11 18156 C:\Windows\system32\conhost.exe 0x4 0 16 14848 c:\Users\harsh\.vscode\extensions\ms-vscode.cpptools-1.20.2-win32-x64/bin/cpptools-srv.exe 13884 {148E32B8-F1BC-4522-B7DA-122A768577F2} 0 11 14548 C:\Windows\system32\conhost.exe 0x4 0 84 16480 "C:\Users\harsh\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\harsh\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=13040 0 31 13624 crashpad-handler 0 44 16800 utility-network-service 0 102 17976 ptyHost 0 69 18272 C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\harsh\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1\" } catch {}" 0 4 19432 "C:\Users\harsh\OneDrive\Desktop\pw c language\Loop\queforinput.exe" 0 7 18448 conpty-agent ```
Workspace Info ``` | Window (queforinput.c - pw c language - Visual Studio Code) | Folder (pw c language): 35 files | File types: c(19) exe(5) json(3) o(1) | Conf files: launch.json(1) settings.json(1) | Launch Configs: cppdbg; ```
Extensions (29) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.2 exe-runner|bra|1.1.1 python-environment-manager|don|1.2.4 python-extension-pack|don|1.7.0 vscode-html-css|ecm|2.0.9 prettier-vscode|esb|10.4.0 code-runner|for|0.12.2 c-cpp-runner|fra|9.4.7 output-colorizer|IBM|0.1.2 vsc-python-indent|Kev|1.18.0 rainbow-csv|mec|3.11.0 debugpy|ms-|2024.4.0 python|ms-|2024.4.1 vscode-pylance|ms-|2024.4.1 cmake-tools|ms-|1.17.17 cpptools|ms-|1.20.2 cpptools-extension-pack|ms-|1.3.0 live-server|ms-|0.4.13 vscode-speech|ms-|0.8.0 vsliveshare|ms-|1.0.5918 color-highlight|nau|2.8.0 autodocstring|njp|0.6.1 colorful-comments|Par|1.0.0 LiveServer|rit|5.7.9 cmake|twx|0.0.17 vscode-lldb|vad|1.10.0 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 jinja|who|0.0.8 (5 theme extensions excluded)
gjsjohnmurray commented 4 months ago

/duplicate of #211106

VSCodeTriageBot commented 4 months ago

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!