Coder Social home page Coder Social logo

windows-dev-performance's Introduction

Windows Dev Performance's Issues

Welcome to the Windows Dev Performance Issues repo!

The purpose of this repo is to collect and catalog issues that affect / impact the inner loop of developers who work on Windows. The developer inner loop would include areas such as compile, run, build, test, debug, and commit. It doesn't matter if you're developing applications FOR Windows or applications that you plan to deploy on Linux, Android, IoT devices, servers, containers, or cloud - if you're building code ON Windows, we'd love to hear from you.

This repo is being driven and managed by a x-team, x-division group of PMs and engineers who're all passionate about improving developers' experience on Windows. We are already coordinating several streams of ongoing work with teams across the company and throughout the community, aiming to drive many issues to ground.

Scope of this repo

Please take note of the current scope of this repo:

✔ In Scope

We are currently only accepting specific types of issues - those impacting the developer inner loop:

  • compile
  • run
  • build
  • test
  • debug
  • commit

Example issues include:

  • Dev tools (e.g. compilers, linkers, etc.) running slower on Windows than expected
  • Runtime platforms (e.g. node, .NET, Python) running slower on Windows than other platforms
  • Your apps experiencing file IO/networking/process-creation related perf issues
  • Etc.

❌ Out of scope

If you have feedback/issues related to the following technologies, please file issues in their repos where the teams that own those technologies will be best able to help:

Tech Repo
Windows Terminal / Console / command-line https://github.com/microsoft/terminal
Windows Subsystem for Linux (WSL) https://github.com/microsoft/wsl
PowerShell https://github.com/powershell/powershell
PSReadLine - PowerShell's interactive command extensions https://github.com/PowerShell/PSReadLine
OpenSSH for Windows https://github.com/powershell/Win32-OpenSSH
.NET Core runtime & libraries https://github.com/dotnet/runtime
ASP.NET Core https://github.com/dotnet/aspnetcore
Roslyn (C# & Visual BASIC Compiler Platform) https://github.com/dotnet/roslyn
Windows Presentation Foundation (WPF) https://github.com/dotnet/wpf
WinForms https://github.com/dotnet/winforms
WinUI https://github.com/Microsoft/microsoft-ui-xaml
Winget package manager app https://github.com/microsoft/winget-cli
Winget package repo https://github.com/microsoft/winget-pkgs
PowerToys https://github.com/microsoft/powertoys
Project Reunion https://github.com/microsoft/ProjectReunion

Submit all other issues via Feedback Hub

If you have other out-of-scope feedback that you'd like to report/share, please submit via Windows' 10's Feedback Hub which will route your feedback to the team that owns the technology you're experiencing issues with.

👉 Feedback Hub offers several very useful features that help us track-down complex issues, including the ability to record scenario-specific repro steps and traces. We may on occasion ask you to file an issue via Feedback Hub in order to collect these traces.

How to File an Issue

File an issue.

Traces

Traces are required for filing an issue. You can collect traces by using The Feedback Hub, or throught the Windows Performance Recorder. If using the Feedback Hub, include a link to the submission in your issue.

Contributing

We're not accepting PR's right now (currently, this is an issues-only repo), but if/when we do ...

Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

windows-dev-performance's People

Contributors

avrimsft avatar crutkas avatar lennybacon avatar mattwojo avatar microsoft-github-operations[bot] avatar microsoftopensource avatar zooba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windows-dev-performance's Issues

Defender consumes ~50% of my machine when creating a Win10 developer VM

Environment

Item Value
OS, Version / Build Windows 10 Build 20236
Processor Architecture x64
Processor Type & Model Core i7 6650 in a Surface Pro 4
Memory 16GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) 83GB free / 256GB SSD
Relevant apps installed N/A

Description

Defender is significantly impacting the performance of my machine while Hyper-V downloads the Windows 10 Developer VM quick create image.

Steps to reproduce

  1. Create a new Win 10 developer VM via Hyper-V Quick Create
    image

  2. While VM downloads ...
    image

  3. ... Open Task manager | Processes & sort by CPU

Expected behavior

Machine remains highly responsive while it downloads a VM in the background.

Actual behavior

Find that Defender is consuming ~40-50% of my CPU.

image

Segment heap opt-in/opt-out flags needed

Item Value
OS, Version / Build 10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz, 3192 Mhz, 4 Core(s), 8 Logical Processor(s)
Memory 32GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 2TB
Relevant apps installed Windows Performance Toolkit

Description

Flags to request or refuse the segment heap are needed in order to give applications control over when to use the NT versus segment heaps.

Steps to reproduce

crbug.com/1014701 describes how the NT heap leads to more than 100% memory overhead on some machines in Chrome's browser and network processes when running for a few weeks on many-core machines. Testing with opting-in to the segment heap using the IFEO registry keys showed that on those machines the segment heap dramatically reduced this overhead, saving hundreds of MB. Unfortunately, as shown in crbug.com/1102281 the segment heap increases the CPU cost in renderer processes, adding up to 13% CPU overhead in some scenarios. This means that the very-valuable segment heap is too expensive for us to enable.

Expected behavior

I would like to be able to enable the segment heap for some processes/heaps only.

Actual behavior

I currently have to enable the segment heap for all chrome.exe processes (using the application manifest), meaning that I have to take the good with the bad.
https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests

crrev.com/c/2337959 proves that it would be quite easy for Microsoft to add a function to Windows that would set or clear the "segment-heap-enabled" bit in RtlpHpHeapFeatures in ntdll.dll. Code inspection makes it clear that it would also be easy to add flags to HeapCreate and RtlCreateHeap to force-enable or force-disable the segment heap. These methods would work nicely in conjunction with the manifest, which by itself is too inflexible to be a complete solution.

That is, we really need these two HeapCreate flags:

HEAP_ENABLE_SEGMENT_HEAP - create a segment heap instead of an NT heap
HEAP_DISABLE_SEGMENT_HEAP - create an NT heap instead of a segment heap, even if the segment heap was requested in the application manifest

Alternately, if we had some way to get the address of RtlpHpHeapFeatures then we could clear that flag in our renderer processes after creating them but before starting. This would ensure that even the process heap would be of the desired type.

These flags would be useful for all Chromium-based browsers.

PowerShell takes a long time to load profile

Environment

Item Value
OS, Version / Build Microsoft Windows NT 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz, 2112 Mhz, 4 Core(s), 8 Logical Processor(s)
Memory 16.0 GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 512GB
Relevant apps installed Windows Terminal

Description

When opening PowerShell, it takes quite some time before I get the first prompt. With Command Prompt it is nearly instant. Anything that can be done to improve load times can help all developers.

image

In this screenshot it took 14 seconds to load the profile.

Steps to reproduce

  1. Use PowerShell or Windows Terminal or Visual Studio Code Terminal to open a PowerShell command prompt.

I do not have any PowerShell extensions installed.

Expected behavior

  1. It should not take as long to open PowerShell.

Actual behavior

I have attached a process monitor log of PowerShell.exe.

LogFile.zip
It seems that there is a lot of opening and closing of registry keys. Maybe that is one area that could be investigated. There is also one thread that appears to takes a few seconds to run.

Win10 Settings App should group common libraries (e.g. Visual C++ Redistributables)

Environment

Item Value
OS, Version / Build 10.0.20175.0
Processor Architecture AMD64
Processor Type & Model i7 7700K
Memory 32Gb
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 50 / 250
Relevant apps installed Microsoft Visual C++ Redistributable

Description

For decades now there is no smart way to control the Visual C++ Redistributable Packages installations in Windows. This is why all Windows users end up with something like this:

image

Steps to reproduce

Easy - install bunch of the most popular Windows programs and some games via Steam.

Expected behavior

Visual C++ 2015 - 2019 Redistributable bundle was a good start.
Create some identical package but with wider range, like 2005 -2020. The new Installer should be able to detect and remove redundant installed versions that are already included into the bundle.
Distribute it via Windows Update, so everyone can get it.
In the end of the day all customers/users will have only one Visual C++ Redistributable installed, not twenty .

Actual behavior

All possible Visual C++ Redistributable versions (minor and major) can be installed on a single machine.

Taskbar icons disappears for a second

Environment

Item Value
OS, Version / Build Windows 10 version 10.0.19041.388
Processor Architecture AMD64
Processor Type & Model Core i5 (Skylake)
Memory 8GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 256GB
Relevant apps installed ___

Description

From time to time, the taskbar icons appears to be refreshed, but it takes such a long time that some icons disappear for about 1 sec. I'm not sure why/when it happens, it seems to be related to disk activity (files deleted/created ?)

Steps to reproduce

No idea how to reproduce it, but it's quite frequent.

Expected behavior

Icons disappear for 500ms-1sec.

Actual behavior

Icons should not disappear, taskbar refresh should be seemless.

W10 "About" Obscures date of installed version/update.

This rather cosmetic issue is relevant to me as an enthusiast/developer. When I install feature updates and intermediate updates, the install date does not seem to change. This has me be nervous about what I have installed (although one can tell by verifying a feature difference).

VW10-2020-10-03-0951-VW10X-About

In this image, the 2020-06-11 appears to be the date in which I created this Hyper-V VM Insider device. The release preview 20H2 was installed this past first weekend of October 2020. That is not reflected in the "Installed on" date.

On my main production desktop, now running (non-Insider) W10 Pro version 1909, there is "Installed on 2019-06-23 OS build 18363.1082." That date us clearly incorrect. (I would be running 2020, but it fails at one of the restart boot stages and reverts to the 1909 that I remain stuck with.)

Allow NAT networks (like WSL2) to be Private instead of Public or Unidentified

Nowadays when you set up a NAT network on Windows (e.g.: Wire up to machines physically and use Internet Connection Sharing, or setting up NAT on Hyper-V/WSL2), the resulting network on the host side (where DHCP server is) is set as "unidentified".

Undefined means Public in Windows Firewall, so for example SMB sharing is blocked by default.

Sure I can open that up, but that means my SMB shares will also be open when I connect to public WiFi or something, no exactly secure.

In these NAT environments, I can control what machine can be connected (In the case of the WSL2 vEthernet, that will be only two, the host, and the WSL2 VM), so I would like to set these networks to be Private.

But I can't, because they are "Unidentified", even though they are defined on the machine itself.

Lag and very slow scrolling using trackpad in Firewall settings app

Environment

Item Value
OS, Version / Build [version 10.0.19041.508]
Processor Architecture x64
Processor Type & Model core i5
Memory 8 Gb
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) 256 Gb
Relevant apps installed ___

Description

Horizontal scrolling using the touchpad in the firewall settings app is laggy and very slow when using the trackpad.

Steps to reproduce

  1. Open the firewall app
  2. Select incoming traffic rules on the left
  3. Scroll horizontally using the trackpad

Expected behavior

Scrolling should be fast/fluid and there should be no lag.

Actual behavior

There is a lot of lag and it's very slow.

Video: https://youtu.be/-hqyGGxbH54

Feedback hub link: https://aka.ms/AA9xusb

Full screen apps

Hello,

I really miss a feature to automatically create a new virtual desktop when I put an application to full screen (a la MacOS).

Thanks in advance.

Kind regards,
Selmir

Windows wakes up randomly and predictably and I don't know why

As a Windows dev I keep my workstation 'on' all times. My power configurations are set to 'power mode (plugged in)' and each day after work my machine screen 'sleeps' -- but at predictably 10PM each night something is waking it up, camera turning on for Hello auth and then goes back to sleep. It apparently happens as well around 3AM. It is unclear to me what is waking this up. I understand there could be many, but I'm not expecting idle time to fully wake my machine.

File locked("File In Use") / Unauthorized Access - Events

Please for the love of all that is holy enable event viewer logging for file locked by process X Access Violations or general UnauthorizedAccessExceptions.
This event should detail reasons why a certain file was inaccessible for programmatic access - programs like handle are all cool programs but the OS probably knows best what was wrong with a certain request. In case of locking processes this should list processes by name and PID. In case of unauthorized access it should detail what exactly made it unauthorized.

As a developer the time I wasted in my life backtracing locked file issues is way too high.
I'm not always able to break a program and investigate the lock, so a monitoring log that lets me read all recent locked file issues would be greatly appreciated - also timing is an issue because some high volatility scenarios like compiling software where files get created and deleted in a matter of a milliseconds are in many cases not locked anymore by the time any lock detection mechanism can step in.

Task View launch performance gradually worsens the longer explorer is running

Tangentially related to #38 - feel free to close this issue in favor of that one if it is a better place to track this.

Environment

Item Value
OS, Version / Build 19042.546 (1803 and up)
Processor Architecture AMD64
Processor Type & Model Intel Core i7-8650U
Memory 8GB
Display Resolution 2256 × 1504, 150% scaling

Description

Since the introduction of Timeline in 1803, I've noticed that there is a perceptible delay between invoking Task View (whether via keyboard shortcut, trackpad gesture or taskbar button) and the actual start of the animation. At first, the delay is just a split second, but it slowly grows longer as time wears on. I've seen this delay reach about 2 seconds, at which point it is practically unbearable. Restarting explorer fully mitigates the lag (albeit only temporarily).

Online reports seem to indicate that this may be related to display resolution/scaling, so I've included that information as well.

Feedback Hub reports pertaining to the problem:

Steps to reproduce

Use Task View heavily for a prolonged period of time. It looks like the issue only affects certain configurations of certain devices, seemingly at random - I'm experiencing it on a Surface Laptop 2 i7/8GB. Having more than one virtual desktop open appears to make this more prominent as well.

When Task View is already slow, restarting explorer fixes it completely, at least for a short while. It is also sufficient to force Task View's overlaid window to be recreated, e.g. by pressing Alt + F4 when Task View is open (my preferred workaround for the issue). Sometimes pressing Win + Tab multiple times rapidly fixes the issue, after some impressively weird visual glitches.

Expected behavior

Task View should launch instantly when invoked, as it did in the pre-Timeline days.

Actual behavior

I have to wait around 500ms, occasionally upward of 1.5s, for Task View to launch. Sometimes the issue spontaneously resolves itself, but only on every other launch - i.e. Task View alternates between opening immediately and lagging first; when it does respond immediately, it subsequently does not animate shut (windows just snap back into place).

Out of curiosity, I tried peeking into the ETL trace captured by Feedback Hub. In it I found a 1.3s message pump delay almost exactly covered by the ShowXamlTaskView event, accompanied by a flurry of CPU usage. After drilling down into the call stack, it looked like a XAML layout call (particularly WindowsInternal::ComposableShell::Experiences::Switcher::SwitchItemList::MeasureOverride) was keeping a core pegged for a substantial portion of the delay (902ms of sampled time). I couldn't find anything to explain why the call took so long, but hopefully that tidbit helps anyway :)

Hololens performance impact on VS.NET

Environment

Item Value
OS, Version / Build 10.0.17763.0
Processor Architecture AMD64
Processor Type & Model 4x Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz
Memory 32G
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SAMSUNG MZVPW256HEGL-000H1, 32 gb free
Relevant apps installed VS19, Hololens related tools

Description

General VS19 speed and responsiveness is lower even when the project does not depend on Hololens, e.g. creating a new WPF project, compiling, debugging, etc slower.

Steps to reproduce

Set up VS19 to be used for Hololens development. Try to use it for WPF development.

Expected behavior

Performance would be the same as before.

Actual behavior

Degraded performance both on VS startup and behavior.

Sysinternals procmon sometimes ignores the Drop Filtered Events checkbox

Item Value
OS, Version / Build 10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz, 3192 Mhz, 4 Core(s), 8 Logical Processor(s)
Memory 128GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 2TB
Relevant apps installed Process Monitor

Description

While trying to track down the cause of a file being created by Chromium's browser_tests my coworker left procmon running with an aggressive filter (so aggressive that no events were shown) and with Drop Filtered Events checked. Despite the request to drop all events the working set for procmon gradually increased to hundreds of GB. I was able to reproduce this on some other machines, but not all. On one machine upgrading fixed the problem, but on other machines it did not. On some machines the new version (3.52) failed, and on some machines the old version (3.52) worked. I first mentioned this issue here:

https://twitter.com/BruceDawson0xB/status/1296156206839418880

This issue made procmon unusable for my coworker for this scenario. Luckily it worked on one of my machines so I was able to gather the necessary data for them.

Steps to reproduce

The bug is inconsistent. The feature works sometimes and fails other times. It is not obvious that the feature is failing unless you know what to look for. If you realize that the event counts are not supposed to go up when all events are dropped then the bug is obvious. Otherwise you have to notice that the memory footprint is increasing without bounds.

Expected behavior

Filtered events should be dropped when that is requested, thus reducing CPU and memory load.

Actual behavior

Filtered events are not reliably dropped when requested, for unknown reasons.

If necessary I can do some debugging on the machine that currently exhibits the problem.

Media Foundation leaks .WEBM, .MKV, and .FLAC file handles

Windows 10 version 2004 Build 19041.572.

All WEBM, MKV, and FLAC file handles opened with MFCreateSourceReaderFromURL() remain permanently locked by the process even after all interfaces are properly released. This doesn't happen to other file types. This has remained a consistent bug for the past several Windows 10 releases.

If Explorer is killed and then restarted from an elevated process, the final explorer.exe process gets a wrong (low) memory priority

Environment

Item Value
OS, Version / Build Windows 10, 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model i7-1068NG7 @2.3Ghz
Memory 32GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) C: SSD 889GB / 1.35TB
Relevant apps installed N/A

Description

I sometimes need to kill Explorer to release locks on DLLs, etc, for testing. When I do so, I will usually restart it from Process Explorer, which will normally be running elevated. In this situation, the elevated explorer.exe triggers a task to restart explorer.exe at normal privilege level. However, this task launches explorer.exe with a memory priority of 3 instead of 5, which causes performance issues with Explorer and any processes it subsequently launches which inherit this memory priority.

This nearly invisible difference causes all subsequent processes to have a significant performance hit (sad slow builds!), and causes development builds of Chromium to assert and die. I would have had trouble locating this if not for a pointer from @randomascii in the thread at https://twitter.com/MarcDurdin/status/1317385409819676672

Steps to reproduce

  1. Launch Process Explorer and select File/Show details for all processes (elevates procexp)
  2. Find explorer.exe and kill it (Del)
  3. Select File/Run, choose explorer.exe.
  4. explorer.exe will start and terminate, and a new instance starts under the task scheduler svchost.exe.

Expected behavior

The new explorer.exe process should have a memory priority of 5.

Actual behavior

The new explorer.exe process will have a memory priority of 3. You can check the memory priority in Process Explorer:

image

Looking a little deeper, I observed that the elevated explorer.exe creates and launches a scheduled task C:\Windows\System32\Tasks\CreateExplorerShellUnelevatedTask, which shows the following priority setting:

<Priority>6</Priority>

According to https://serverfault.com/a/257183/342637, and verified in testing by me, setting the priority to 4 will give explorer.exe the correct memory priority.

Application Verifier slow down due to log name collision

Environment

Item Value
OS, Version / Build Microsoft Windows NT 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz, 3192 Mhz, 6 Core(s), 12 Logical Processor(s)
Memory 32GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 2TGB
Relevant apps installed Application Verifier, Visual Studio 2019 16.5.4

Description

There appears to be a name collision slow down bug in Application Verifier when testing with multiple instances of a single process over a long period of time. Each time a new process is spawned it attempts to search for the next numerical log file to write. When doing many runs (in parallel or not) this results in a significant slow down upon application start.

image

My tests went from taking 24 minutes to complete to taking 20 seconds once I deleted all the logs. The entire log folder consumed nearly 9GB of space. When I disabled Application Verifier it went from 20 seconds to 13 seconds.

https://twitter.com/nmnvzr/status/1283158619500888064

Steps to reproduce

  1. Download and Install Application Verifier
  2. Set up Application Verifier to track a particular executable
  3. Run that executable many times (maybe 10,000)
  4. Notice that each subsequent time the executable is run it takes more time then the last because it is trying to find a log filename that it does not have a collision with

Expected behavior

It should not be consuming so much time finding a log filename. It might be better to generate the log filename based on timestamp and process id, that way it doesn't have to do this O(n) search.

Actual behavior

It does consume a bunch of time finding a log filename

TextBox: Using Ctrl+Backspace for deleting words

In most input parts of Windows one can use Ctrl+Backspace for deleting words. However this does not work for the classic Text/TextBox control, where pressing Ctrl+Backspace inserts the delete character (0x7F), which gets rendered as a box:
image

One specific location where this happens is when renaming files in explorer:
image

It would be nice, if that keyboard combination could consistently delete whole words.

MSYS/Cygwin performance is extremely low

Environment

Item Value
OS, Version / Build Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.0.18363.0
Processor Architecture ___ (no output? but it's x64)
Processor Type & Model Intel Broadwell
Memory 16GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 14.5 GB / 81.6 GB
Relevant apps installed mingw-w64/msys2

Description

Lots of software uses GNU autoconf or build systems written in POSIX shell. Typically, these use msys/cygwin to run on Windows at all (otherwise they couldn't support Windows). However, performance is extremely low. Essentially, Windows is missing a well-integrated POSIX environment, and the emulation done by Cygwin is, in many situations, extremely slow.

Please note that WSL does not solve the problem in general. It's not well-integrated, but it's more like a VM (WSL2 is literally a VM). A solution that is well-integrated is required. POSIX shell execution is actually only an example. Any project that makes use of POSIX, a standard for portable OS access, suffers from win32's non-orthogonal mess, that makes porting to Windows a nightmare. Even projects supported by Microsoft suffer from this problem. For example, consider: https://github.com/PowerShell/openssh-portable/blob/latestw_all/contrib/win32/win32compat/fileio.c https://github.com/PowerShell/openssh-portable/blob/latestw_all/contrib/win32/win32compat/w32fd.c.

It should not be necessary for every program to invent a POSIX compat. layer for Windows, which will be slow (as win32 does not provide the required capabilities). This will generally reduce the Windows experience, and it's Microsoft's responsibility to offer a better solution.

Steps to reproduce

A good test is running ffmpeg's configure program. FFmpeg is well-known enough, so no further description is necessary. However, it affects a lot of other projects.

Expected behavior

POSIX shell execution is as fast as on Linux.

Actual behavior

POSIX shell execution is several magnitudes slower than native or even virtualized Linux.

MS Edge redirection in search

Hello,

Thanks for asking !

I think everything is in the title, stop redirecting to MS Edge from fhe Windows start menu search (Win+Q) and let us chose to not redirect to internet and let us change default browser selection.for this feature.

Bonus point for Win+Q : if I enter 2+2 in it please give me the answer directly instead of searching for it on Bing.

Kind regards,
Selmir

Task View animations are broken

I realize this issue is probably out of scope for this repo. However, emboldened by #12 and fed up with the years-long annoyance I decided to give it a try anyway. If you decide to close this issue because it does not fit this repo, I will understand.

Environment

All Windows 10 versions since 1809.
The issue may be more pronounced when using scaling levels above 100%.

Description

The animations when opening Task View / Timeline have been very annoyingly broken not for one release, not for two, but since 1809.

Steps to reproduce

Open Task View. The issue may be more pronounced when using scaling levels above 100%.

Expected behavior

I would expect a clean, fast, high-quality animation worthy of the world's most important desktop OS used by over a billion people, developed by one of the most valuable companies in the world.

Actual behavior

You can stream a short screen recording showing this issue here: https://1drv.ms/v/s!AFJVlaoP229Vs4Qu

Window thumbnails flash and jump around at the end of the animation. Sometimes they all jump down and to the right. Sometimes they only jump to the right. Sometimes, in extremely rare cases, they don't jump at all.
Although not visible in the GIF, the "new desktop" button when there is only one desktop makes a small jump to the right as well.
Also not visible in the GIF: When having many window thumbnails, their layout may sometimes change, i.e. the rightmost window of a row jumps to the leftmost position of the next row at the end of the animation.

There have been many Feedback Hub issues about this over the years, e.g. this one: https://aka.ms/AA4y49e

If I may have a personal guess, it's that when the Timeline is loaded, not only is it shown under the thumbnails but the entire view is replaced by what Timeline renders. Unfortunately, it seems Timeline has a different logic to place the window thumbnails than the animation does. Again unfortunately, the jump also happens when Timeline is disabled. I also guess that when Timeline is disabled, some code for it still loads but simply shows nothing for the Timeline itself, but it still does for the thumbnail placements. Of course, I have no idea if any of this is true. However, supporting my guess is the fact that when using two screens, the animation is fine on the secondary screen, where Timeline doesn't show.

I use Task View and virtual desktops many, many times a day. Every time I have to deal with that horrendous animation. All this talk about design and all the beautiful sizzle reels are really nice, but in the end what people see is this. What does it say about Windows that this is still there after so many releases and almost two years? It's what people see when they try Surfaces in stores.

I don't think this requires many more words beyond what I've written. I can't really think of a satisfying explanation for why this has been so obviously broken for so long. Perhaps you can see my opening of this out-of-scope issue as a sign of my desperation, and a last call out into the void. Apologies for being so dramatic.

File Explorer very slow when there are a lot of media files.

Environment

Item Value
OS, Version / Build Windows 10, Version 10.0.14092.0 (Insider Build)
Processor Architecture x64
Processor Type & Model Intel Core i3-6006U
Memory 16GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) C: SSD 37.4GB/111GB
Relevant apps installed VS Code, Visual Studio

Description

When I'm working on a folder with a lot of media files (say, music for a game I'm developing), the File Explorer would take a long time to process the metadata. If the files are on an SSD, it's manageable but if it's on a slow drive (especially if it's a secondary drive and the chipset lets the drive to enter sleep mode) it can take a lot of minutes.

This only happens if the folder's view is set to "Details" and the metadata tabs are visible. If the folder has a lot of general files (scripts, for example), it will load in normally.

Steps to reproduce

  1. Put a file with a lot of media files in a drive (preferably, not the main one).
  2. Make sure that the view is set to "Detailed" and you have a few tabs that are related to the metadata of the files (Title. Artist, etc.).
  3. Open the folder.

Bonus:

  • In a secondary drive, make sure that it's allowed to enter sleep mode (as far as I know, the Intel Rapid Storage Control Panel does let you set the power saving mode for the secondary drives).

Expected behavior

The explorer would show all files. After a few seconds, it would show the metadata for all files.

Actual behavior

File Explorer takes a long time to load files. Sometimes, it does this:
image
Or the window hangs.

File Explorer takes a long time to delete node_modules

Environment

Item Value
OS, Version / Build 10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz, 3192 Mhz, 6 Core(s), 12 Logical Processor(s)
Memory 32GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 2TB
Relevant apps installed Node.JS / NPM

Description

When working on a project that utilizes package manager npm, it creates a node_modules directory that contains at least 100,000 files. On larger projects it can be even more. Deleting the node_modules directory from File Explorer takes a long time, and some times it goes through capturing all the information about the files and fails on some further steps.

nodemodules4

Often times File Explorer is the first way that users and developers go to delete files. Only after File Explorer fails do they then have to result to a command prompt. It is quite annoying to have to drop to a command prompt just for this folder. I know I can't be the only developer who experiences this problem.

For a comparison, this is how long it takes to delete the folder on macOS:

nodemodules3

I realize that both operating systems do different things behind the scenes, but it is unlikely that I can believe that nothing can be done to improve the experience with deleting folders that have lots of files.

Steps to reproduce

  1. Must have npm project already (you can try CRA for example)
  2. npm run install
  3. Open file explorer and delete node_modules

Expected behavior

It should not take so long to delete all the files.

Actual behavior

It takes a significant amount of time. File Explorer goes through various steps of calculating time, etc, after which it presents an UAC dialog, and then another permissions dialog at which point I end up just canceling.

Suggestions

  • It should recognize that the folder has many files and present an option to the user asking if they want "quick delete" the folder because it has too many files. In this instance File Explorer might choose to not notify all other apps that each individual file is being deleted, only that the main directory is being deleted.
  • Delete the folder immediately, and notify all apps of file deletes in the background.

Photos app very slow

Environment

Item Value
OS, Version / Build Microsoft Windows NT 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model Intel i7 8650U CPU @ 1.90GHz
Memory 16GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) 1TB SSD
Relevant apps installed VS code etc

Description

Images app does not open the images quickly, it shows a blank black screen for long time and crashes.

Steps to reproduce

Open a Image

Expected behavior

Open it

Actual behavior

It crashes - multiple times I have observed it get stuck with no image viewer.

image

Revert Visual Studio New Project Window to Tree View

The new VS 2019 new project window is a massive downgrade, especially to people in education. The search doesn't work half the time, finding specific project templates takes way too long and it is very difficult to teach middle schoolers exactly which steps to go through to make sure the right project type is selected for their project. The amount of accidental VB or wrong GUI type projects has gone up exponentially with the release of the new window. Please bring back the old one, as its actually usable.

Steps to reproduce

Open VS 2019 and see how many steps it takes to create a .NET Framework C# Windows Forms App. Also see if you search, how many other options show up even if you search Windows Forms Framework

Expected behavior

A new project window that is easy to use and teach for new users.

Actual behavior

The new project window is extremely painful and a burden on education and development time.

This window.

NewProjectWindow

The biggest issue is the tiny amount of difference between languages with project templates named the same. The icon changes between C# and VB are minimal, resulting in many projects in the wrong language, even for seasoned developers.

Trackpad scrolling lags in left panel of the file explorer

Environment

Item Value
OS, Version / Build [version 10.0.19041.508]
Processor Architecture x64
Processor Type & Model core i5
Memory 8 Gb
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) 256 Gb
Relevant apps installed ___

Description

Vertical scrolling using the touchpad on the left panel of the file explorer lags and shows some visual glitches.

Steps to reproduce

  1. Open the file explorer
  2. Scroll up quickly in the left panel (tree view)
  3. Scroll down quickly

Expected behavior

Left panel should start scrolling down as soon as you scroll down.

Actual behavior

It lags: keeps scrolling up before slowly going down. So it doesn't follow the fingers moves.

Video: https://youtu.be/fC2PovdXClY
Video (glitch): https://youtu.be/fC2PovdXClY

Feedback hub link: https://aka.ms/AA9xnxr

Can't create files called "con." or "aux."

Not sure if it's actually in scope since not directly speed related but yes.

When developing cross platform, you have to take extra care to not call files like this.

This is also causing trouble for many cross platform open source tools/communities that have to work around it, see rust-lang/crates.io#695 as example.

Add support for a JavaScript projection of the Windows Runtime API

Migrated from microsoft/react-native-windows#4759 as that request isn't react native windows specific.
Original filed by @dstaley

Proposal: Add support for a JavaScript projection of the Windows Runtime API

Summary

As a JavaScript developer, I'd like to be able to call Windows Runtime APIs without writing a native module in an unfamiliar language such as C++ or C#.

Motivation

As a JavaScript developer building a Windows app with React Native, I'd like to avoid having to switch languages to call useful Windows Runtime APIs. Since there's already a precedent for the Windows Runtime supporting multiple language projections (C++, C#, and now Rust), and, most importantly, since there was already a JavaScript language projection at one point, it would be great for React Native for Windows to support calling these APIs from JavaScript either out of the box or through an easily-installable module.

Basic example

External Package

import CryptographicBuffer from 'react-native-windows-runtime/security/cryptography';

const num = CryptographicBuffer.GenerateRandomNumber();

Built-in

import { NativeModules } from 'react-native';
const { CryptographicBuffer } = NativeModules.Windows.Security.Cryptography;

const num = CryptographicBuffer.GenerateRandomNumber();

Open Questions

The biggest question I have is whether this is possible given that React Native for Windows uses JSC/Hermes, whereas I believe the JavaScript projection was only ever supported in ChakraCore.

Cloud Clipboard lacks search and only supports 25 entries

Context
I use the Windows 10 Cloud Clipboard every day. It's great to have a built-in Clipboard Manager, which really helps in tons of development situations (e.g. when managing snippets of text between editor windows). However, the Cloud Clipboard:

  • Only supports the last 25 copied items, hindering it's usefulness as a recent history of copies from a programming session. I frequently want to dredge back up a key item I copied perhaps 2 hrs ago, and often that's fallen off the most recent 25 list, which is frustrating.
  • Doesn't allow for selection via searching through recent entries by keyboard, which slows down pasting in entries. I really miss this feature when compared to the macOS clipboard manager I use, the excellent Pastebot.
  • Doesn't play will when pasting into the Windows Terminal.

Requests

  • Make the length of history in Cloud Clipboard configurable, and support large histories (~1000 entries).
  • Add a search window to the cloud clipboard that gets focus on typing when the Cloud Clipboard is active (e.g. Win + V, "foo" would filter down to only entries containing the substring "foo"). Hitting enter after a search should immediately paste in the top (highlighted) result from the filter.
  • Paste as plain text is a super common requirement when working with code. If this can be added as a power user feature (e.g. shift + enter would paste plain) that would be extremely convenient when copying code from an editor into a rich text doc.
  • Nit suggestion: deprioritise the 'Automatic Syncing' in the cloud keyboard. I always disable it to avoid surprises with sensitive text leaving the device I'm working on, and I don't work between devices where the context is the same enough for it to be a useful feature. If syncing is holding back the local clipboard manager from being more full featured/supporting larger histories, that would be the wrong priority in my opinion.

Even better to all the above - open source the Cloud Clipboard! I would love to have the opportunity to put up PRs that address these features myself. :)

Hope this issue is in spirit with this new repo. Keep up the great work.

GetFirmwareEnvironmentVariable(Ex) does not provide a way to know the UEFI variable's size

Currently, this method and derivatives does not provide a way to know the exact size needed to store the resulting UEFI variable, meaning that the API must be called in a loop until it does not fail - this is bad API design and extremely inefficient.

Most APIs in Windows which can result in variable-sized data provide a way to retrieve its size before, for example GetWindowText has the matching GetWindowTextLength. While this does give the potential for race conditions, repeatedly calling the API in a loop has an even worse potential for race conditions.

Transcoder throws exception when using HLS or DASH as source

Environment

Item Value
OS, Version / Build 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model Core i7
Memory 12GB
Storage Type, free / capacity SSD 512GB
Relevant apps installed VS 2019 16.6.5 + UWP SDK

Description

I'm trying to create a video preview of a live video stream (eg. 4 seconds of a HLS or DASH stream). The MediaTranscoder API has a method which looks like it should work with an AdaptiveMediaSource (ie. streaming video source) but does not - instead, I get an exception.

Steps to reproduce

  1. Find a HLS or DASH stream (there are many test feeds out there, not encrypted)
  2. Create an AdaptiveMediaSource from the URI
  3. Pass the source to Transcoder.PrepareMediaStreamSourceTranscodeAsync

Expected behavior

I expect the transcode to complete resulting in an IRandomAccessStream which I can then view directly or save to disk.

Actual behavior

When using a source from AdaptiveMediaSource.CreateFromUriAsync I get an InvalidCastException from the transcoder.

If I use MediaSource.CreateFromAdaptiveMediaSource to convert the source type, I get a NullReferenceException.

App to reproduce the behaviour... https://github.com/theothernt/TranscodeStreamIssue

Aero Peek Window Preview gets shifted to the top & left

The window previews (Aero Peek) get shifted to the left & top when hovering on taskbar previews.

out

Note: This is an ancient bug (starts from RS4 I believe) and have been in Feedback Hub for so many times by half a dozen people, but still not fixed as of the latest Dev channel build.

Feedback Hub links just to name a few
https://aka.ms/AA20rko
https://aka.ms/AA93yus
https://aka.ms/AA93yut

Please come up with a fix since this is getting very annoying.

Improve filter dialog selection in Sysinternals' Process Monitor (ProcMon)

Environment

Item Value
OS, Version / Build 10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz, 3192 Mhz, 6 Core(s), 12 Logical Processor(s)
Memory 32GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 2TB
Relevant apps installed Process Monitor

Description

Process Monitor is an important tool for developers and is very useful for tracking down performance related issues. There are some usability issues with the filter dialog box that always comes up when launching the application.

It is common to have many filters when debugging different programs. Process Monitor saves these filters. However these is no way to easily uncheck a group of filters or to even uncheck a filter by selecting it and pressing space bar. The dialog only allows single selection of a filter and doesn't respond to space bar key or delete key.

image

Before I took this screenshot I had 15-20 filters added but had to nuke them to take the screenshot. Having so many filters used to debug different applications, each time I opened the filter dialog I had to uncheck each one manually because by default all items are initially checked upon program startup.

Improving the usability of the filter dialog enhances the experience of the developers who are using it to debug performance related issues.

Steps to reproduce

  1. Download and run Process Monitor
  2. Add several filters
  3. Try to select multiple filters to uncheck
  4. Try to select a single filter and press space bar to uncheck
  5. Try to select a single filter and press delete key to remove

Expected behavior

  1. Selecting multiple items should be allowed
  2. Pressing space bar key should uncheck or recheck and item
  3. Pressing delete key should delete an item
  4. Selecting multiple items and pressing space bar key should check/uncheck all of them
  5. Selecting multiple items and pressing delete key should delete all of them

Actual behavior

  1. Only a single item is able to be selected at a time
  2. It is not possible to use space bar to uncheck an item

GetAppAndOptionalStorePackageUpdatesAsync Still Broken

Are Store-related issues in-scope? Honestly have been struggling to find the appropriate channel for reporting such problems and and getting solutions. Links below seem to indicate other people have the same issue. Generally getting a "not our problem" response.

This brings me to GetAppAndOptionalStorePackageUpdatesAsync being broken for quite a while.

MicrosoftDocs/windows-dev-docs#442
MicrosoftDocs/windows-dev-docs#1726
https://developercommunity.visualstudio.com/content/problem/535657/uwp-app-storecontext-getappandoptionalstorepackage.html

I used to have it in my UWP apps, but decided to remove it since it broke. Now I'm back to trying to make it work since I have a kiosk app (assigned access) that doesn't seem to update automatically through the Store.

VS2019 set user location in simulator for testing navigation

Hi there everyone and thanks for creating this repository for reporting problems.
I have VS2019 Professional V16.6.5.
I'm trying to create a location-aware app but for testing tracking features and voice navigation and some other things I didn't find any way to simulate the user location.
In Windows Phone/Windows 10 Mobile Emulator we had an option to set user location on the map for testing such programs, but in Simulator or in the Windows settings I didn't find anything for this.
image

Seems, there was another report before for this missing feature here:
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/8af845f5-6f18-4e30-a12c-cb1175894e4a/windows-10-simulator-set-location-button-is-missing
But no actions till today.
Regards

Windows search is painfully slow

In frustration I've disabled searching and system indexing (as it also arbitrarily decides to consume a lot of CPU resources) and only rely on Everything whenever I need to look for files within Windows.

Transparency About Windows Shell Investments

Windows 10 has been subpar design-wise for at least two years now. Microsoft hasn't yet published a roadmap for their investments in Windows 10's shell experience.

image

Since Windows 10 is a crucial part of Microsoft 365 (pictured above), this proposal requests that Windows developers announce the investments detailed in Panos Panay's "Accelerating Innovation in Windows" blog post to the public alongside the other important services which already publish this information.

Frequently Asked Questions:

  • Why should the Windows team commit to deadlines for customers?
    Answer: Other products at Microsoft routinely publish information to this blog and commit to release dates. Why should our experience using Windows be any different? It would help to publicly state why Windows Shell is different in this regard from-say-Outlook Web.

  • Aren't there already design changes and experience improvements flighting in the dev channel?
    Answer: The dev channel model is an excellent way to test changes which aren't guaranteed by Microsoft. We would like to know when the rest of these changes will hit the dev channel before they actually do.

  • Isn't this revealing too much intellectual property which diminishes our strategic edge?
    Answer: The strategic edge of Windows (being a proprietary operating system) should precede the announcement of changes to testers. This means that the current model is insufficient because the changes are flighted "out of the blue" with no prior announcement. The strategic edge should be similar to other operating systems where testers aren't viewed as potential leakers of internal plans.

  • Won't a commitment to releasing these changes result in false expectations in case we cannot deliver?
    Answer: You won't commit to releasing these changes to the public, but instead being transparent about changing plans as they happen. Other services within Microsoft can commit to deadlines, but I understand that the Windows Shell is an exception.

Tar on Windows is very slow when extracting many small files from tar files

Environment

Item Value
OS, Version / Build Windows 10 version 10.0.19041.388
Processor Architecture AMD64
Processor Type & Model Core i5 (Skylake)
Memory 8GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 256GB
Relevant apps installed ___

Description

Creating multiple small files is very slow: Windows Defender's real-time protection appears to makes things even slower but even when it's disabled Windows appears to lag behind Linux and macOS when handling multiple small files.

To show how slow Windows is at creating lots of small files, I downloaded the Firefox sources. Since it's a tar.bz2 file, I first uncompressed the .bz2 file to get the .tar file and all tests were done using this file as a source. It's a 852mb file that flattens to a directory containing 119 954 files.

I know it's an extreme case, but it's not rare having to deal with thousand of small files when working with npm, git, development, etc..

I added macOS results (running on a slow MacBook with a core m3) as a comparison.

Operation Windows 10 (protection on) Windows 10 (protection on, folder excluded) Windows 10 (protection disabled) Ubuntu (WSL2) macOS
flatten tar file 28m38s 3m14s 1m29s 15s 50s
delete directory 58s 57s 45s 5s 14s

The commands I used were:

  • Mac & Linux: time tar -xf firefox-40.0.source.tar and time rm -Rf mozilla-release
  • Windows (PowerShell): Measure-Command { tar xf .\firefox-40.0.source.tar } and Measure-Command { rm -r -fo .\mozilla-release\ }

I am sure that improving these file operations will benefit to a lot of different Windows use cases:

  • installing Windows apps
  • installing dev packages, like npm, ruby gems,...
  • git operations on large repositories
  • building apps/websites (webpack, C/C++ compilers,...)
  • apps like VSCode that need to deal with lots of files in the background
  • installing Windows updates
  • even browsers like Chrome/Edge have caches with lots of files in it
  • ...

Windows & Linux (WSL2) tests were run on a Surface Book 1/core i5/8gb/256gb SSD.
Mac tests were run on a 2017 MacBook 12" with a core m3/256gb SSD/8gb and Catalina 10.15.3

Applications used:

App Windows 10 Ubuntu (WSL2) macOS
tar bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.5.F-ipp (tar.exe that's included in Windows 10) tar (GNU tar) 1.30 bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.6
delete tool rm -r -fo (powershell alias) rm (GNU coreutils) 8.30 rm from Catalina 10.15.3

Jumplist performance is still too slow - 200-250 ms to display a menu

Item Value
OS, Version / Build 10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Processor Architecture AMD64
Processor Type & Model Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz, 3192 Mhz, 4 Core(s), 8 Logical Processor(s)
Memory 32GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 2TB
Relevant apps installed Windows Performance Toolkit

Description

I frequently right-click on items in the task bar in order to view their properties or close them. Last year I reported a ~500 ms delay due to massively redundant ReadFile calls. This was fixed. However, closer analysis shows that there still remains a 200-250 ms delay from the moment that the mouse button is released until the menu appears. This is well beyond the ideal human interaction times and is a constant frustration. I don't want to wait for my computer, especially when doing simple and repetitive actions that I know it should be able to do roughly ten times faster. Closing multiple programs in this way becomes frustrating, even after the ReadFile fixes.

Steps to reproduce

Right click on a running program on the task bar. Notepad works.

Expected behavior

I expect the menu to appear visually instantaneously. Ideally in less than 50 ms. Certainly in less than 100 ms.

Actual behavior

Note the delay before the jumplist appears. The delay happens with all programs - even Notepad.

I analyzed the delay scientifically by recording an ETW trace using UIforETW with GPU tracing enabled. This gives me three crucial bits of information:

  1. UIforETW logs custom ETW events for all user input so I can see exactly when the right-mouse button is pressed and released.
  2. Microsoft-Windows-Win32k logs information about Window in Focus changes so I can see exactly when a window gains focus.
  3. The GPU tracing lets me see exactly when GPU activity occurs so that I can tell when the menu is drawn.

From the mouse-up event to ShellExperienceHost.exe gaining focus is approximately 120 ms.
From the focus change to the large spike of GPU activity which I believe represents the menu being rendered is approximately 110 ms.

Thus, in the particular event that I am looking at the total latency is 230 ms. This is fairly consistent across multiple traces, multiple clicks on the same entry, etc.

I can supply ETW traces and more analysis details if there is interest. The slowdown is mostly from CPU activity. I see 139 ms of CPU consumed in ShellExperienceHost.exe, 102 ms in RuntimeBroker.exe, 40 ms in explorer.exe, and lesser amounts in System and dwm. There is not enough parallelism to make this 200+ ms of CPU time happen quickly enough.

Sampling data says:

  • About 53 ms is spent in JumpViewUI.dll!JumpViewUI::JumpListViewModel::UpdateContents. Seems excessive.
  • Another 17 ms is spent in Windows.UI.Xaml.dll!CCoreServices::NWDrawTree
  • Another 19 ms is in Windows.Internal.Shell.Broker.dll!TileIconLoader::GetBitmapFromExtractIcon, which includes loading a DLL
  • Another 13 ms is in StartTileData.dll!winrt::WindowsInternal::Shell::JumpList::Broker::implementation::JumpListShellItemData::JumpListShellItemData, which includes time spent in shlwapi.dll!IShellFolder_GetDisplayNameOf
  • There were 27 samples in explorer.exe but they defy categorization - it's not clear what it was doing

Open/Save dialogs: trackpad with scrolling goes way too fast

Environment

Item Value
OS, Version / Build [version 10.0.19041.508]
Processor Architecture x64
Processor Type & Model core i5
Memory 8 Gb
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) 256 Gb
Relevant apps installed ___

Description

Vertical scrolling using the touchpad in open/save dialogs goes way too fast.

Steps to reproduce

  1. Open MSPaint and bring up the save dialog
  2. Set the view to huge icons
  3. Try to scroll vertically

Note that there need to be enough entries in the selected folder so that there are 5-10 lines.

Expected behavior

Scrolling should follow the fingers and do not go too fast, as in the file explorer for example.

Actual behavior

It goes way too fast: moving the fingers just a little, skips several lines, which make the use of the trackpad to scroll not possible.

Video: https://youtu.be/8uEbVgghqbQ

Feedback hub link: https://aka.ms/AA9yazv

Trackpad scrolling is broken in Task Manager

Environment

Item Value
OS, Version / Build [version 10.0.19041.508]
Processor Architecture x64
Processor Type & Model core i5
Memory 8 Gb
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) 256 Gb
Relevant apps installed ___

Description

Horizontal scrolling using a touchpad doesn't work in task manager's Process tab, and vertical scrolling doesn't work in the Performance tab's left-most column of counters.

Steps to reproduce

  1. Open Task Manager
  2. On the Process tab. try to scroll horizontally using the touchpad (note that the Surface Book has a precision touchpad)
  3. Open the Performance tab and try to vertically scroll the left-most column of counters with the trackpad

Expected behavior

Task Manager view should scroll the indicated grid/stack.

Actual behavior

It does not scroll at all.

Video: https://www.youtube.com/watch?v=4TLOJBi3CU8

nodejs and yarn are 4x slower on windows than ubuntu

npm and yarn are the bread and butter of package management for the nodejs ecosystem, of which react-native is a part of.
Yet, these tools are very slow and finnicky on Windows. There are many stackoverflow posts about people asking why yarn is so slow.
We feel this pain ourselves too (RNW team) and we hear it from people coming form mac OS or Android and wanting to add Windows versions of their RN apps.

I recently added a CI loop in github actions, that does the exact same thing for a popular 3rd party npm package I contributed to (envinfo): install yarn dependencies, build the typescript, run the package.

What I saw was that Windows took 4 times as long as ubuntu to do end-to-end install of the package and running it once.
I imagine part of it is that the yarn/nodejs implementation is suboptimal on windows, but it seems that even github actions is spending a lot more time doing things on Windows that aren’t “run the user’s code” than on Ubuntu.

What's worse is that the ubuntu virtual hardware seems a lot less powerful than Windows', so the actual measure is probably a lot worse than 4x.

Here are my measurements:

  ubuntu Windows
Set up job 2s 1s
Run actions/checkout@v2 1s 26s
Use Node.js 10.x 1s 15s
Run yarn 43s 2m 19s
Run node --unhandled-rejections=strict src/cli.js 18s 1m 0s
Post Run actions/checkout@v2 0s 17s
Complete job 0s 0s
Total 65 258
    3.97x
     
Machine class Standard_DS2_v2 Standard_D4_v2
vCPU 2 8
Memory 7 28
Temp storage 14 400
Max temp storage throughput: IOPS/Read MBps/Write MBps 8000/64 (86) cached 6400/96 uncached 24000/375/187
Max data disks 8 32
Throughput: IOPS   32x500
Max NICs/Expected network bandwidth (Mbps) 2/1500 8/1/6000

Windows get resized when switch to fullscreen and back to desktop

Environment

Item Value
OS, Version / Build Windows 10 version 10.0.19041.388
Processor Architecture AMD64
Processor Type & Model Core i5 (Skylake)
Memory 8GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) SSD 256GB
Relevant apps installed ___

Description

When switching to full screen in some apps/games, when going back to the desktop, most of my windows get messed up: they are moved/resized.

Steps to reproduce

  • download dosbox
  • open any windows and maximize them
  • start dosbox and press alt + enter
  • press alt + enter to switch back to window mode

Expected behavior

Previously opened windows should be left untouched: positioned at the same position and with the same size.

Actual behavior

Some windows get moved/resized.

See this video: https://youtu.be/UtB7P8f2j2A

As you can see, the Chrome Window takes most of the screen before switching to fullscreen and get resized when switching back to window mode.

Windows 10 Memory Compression negatively impacts developer productivity on "large" memory systems

Description

Some community developers are reporting that Windows 10 memory compression can negatively impact their development productivity.

For example, one developer posted:

VsChromium uses ~6 GB of RAM to hold all of Chromium's source code. This is a good thing, and allows <0.5 s searches of all the source.
Windows 10 memory compression doesn't like this. It compresses the memory if I don't use it for a while, and the first search then takes ~5.5 s.
image
Memory compression is great for users without enough memory. I have 32 GB of RAM, so the compression upside is minimal, and the downside is... a five second wait to decompress ~6 GB of data when I need it all at once (with the associated waste of power to compress/decompress).

https://twitter.com/BruceDawson0xB/status/1293296511883698176

In an older post last year, they had this to say as well:

Me: I have 50 GB of memory available (free or disk cache), life is good!
Windows: I only have 50 GB of memory available - I will compress memory to free up more!
So now I have 6.3 GB of compressed memory. Maybe that's good? But it seems like a weird trade-off to me.

I grabbed a trace of the OS faulting in 5+ GB of compressed data to processes that I think it should have not compressed in the first place. Now I can look at the trace and make definitive statements of how reasonable Microsoft's heuristics are

Data!
Windows decided that VsChromium was using too much memory. I then started typing, forcing Windows to decompress 4.5 GB of compressed data in ~5 seconds.
During that time VsChromium had to spend ~92% of its time inside KiPageFault instead of searching Chrome's code:
image

The amount of time spent in KeYieldProcessorEx and various lock functions suggests that the code wasn't designed to scale to 48 logical processors, but that's a separate issue.
VsChromium was less responsive during that time - it couldn't keep up - but I can't quantify that any better than "for 5 seconds 92% of its time was spent paging"
And I just don't think the temporarily 10% larger disk cache justified that.

https://twitter.com/BruceDawson0xB/status/1211805536783495168

This is particularly unfortunate as extensions like VSChromium store their text compressed, in a form optimized for searching. Which means that Window 10's Memory Compression is actually just spending CPU cycles with little to show in savings in memory reduction.

Steps to reproduce

The developer reported using the VSChromium extension in Visual Studio to open and navigate a copy of the Chromium (Chrome Browser) source code. Once the code has been indexed, they long enough for the MMAgent's Memory Compression sweep, and then performed a code search using the VSChromium extension which took significantly longer than expected.

Expected behavior

On a system with a "sufficient" amount of memory, Memory Compression should either not be used or be significantly less aggressive.

Actual behavior

On a system with a "large" amount of memory (32GB+) Memory Compression aggressively compresses memory even when the system is not under "heavy" memory pressure leading to a loss in performance and developer productivity.

SetWinEventHook and SetWindowsHookEx does not provide a way to pass user data

Currently, these methods have no way for users to provide user data parameters if the hook is ran in the hooker process (in process). This can be problematic in advanced scenarios, where multiple hooks can be desired (I scope my hooks as much as possible because hooking all events can cause system slowdowns).

Currently, none of the possible solutions are pretty:

  • Generate thunks, which involves dynamic codegen (a security can of worms) and is not portable at all. I even have a whole project that I started due to this problematic API: https://github.com/sylveon/member_thunk
  • Store a static pointer and have the callback access this pointer. This results in a great loss of flexibility because you cannot "create" static variables at runtime to accommodate the need for dynamically created hooks.
  • Use something like std::unordered_map<HWINEVENTHOOK, std::function<...>>, pass the same callback to all hooks and have that callback lookup the map. This is frankly just janky and results in increase memory usage and increased callback execution time, which is critical for system responsiveness.

As far as I know, these two functions are some of the only callback-based functions having this limitation. Even window procedures have a way to store a custom user data pointer.

Additionally, adding this feature for out of process hooks would also be useful as it would allow the hooker process to pass information like a handle acquired with DuplicateHandle, or the handle of a window to use for communication with, to the callback running in the hooked process. Currently, I rely on Detours' DetoursCreateRemotePayload to transfer this information but this solution is far less than ideal, and does some pretty questionable things to the target process (like create a memory allocation that's practically not freeable because Detours never gives you the base pointer and doesn't have an API to free such payloads).

Sometimes Alt + Tab switches to the wrong window (since KB4571744, 19042.487)

Environment

Item Value
OS, Version / Build Windows 10, 19042.487 and higher.
Processor Architecture N/A
Processor Type & Model N/A
Memory N/A
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) N/A
Relevant apps installed N/A

Description

Sometimes, when pressing Alt + Tab the wrong window is being switched to. Specifically, if one has three windows A, B and C (appearing in the Alt + Tab menu in that order) and is switching between A and B using Alt + Tab, sometimes window C switches to the foreground instead. When this happens, it can be observed that the selection on the Alt + Tab menu is not on the second entry, as it should be, but on the third. This problem has been appearing most likely since KB4571744 (19042.487). Also, it appears to only occur when one of the open Windows is Edge, though I cannot confirm this with absolute certainty as the problem cannot be reproduced entirely reliably and appears often, but irregularly.

I suspect this may be related to the Alt + Tab changes for Edge tabs, even though I have that feature disabled. Needless to say, it's very annoying to work with several windows and not switch to the one you expect.

Steps to reproduce

  1. Open three windows, one of them being Edge.
  2. Switch with Alt + Tab between Edge and one of the others several times.
  3. Soon enough, the wrong window will be switched to. You may need to be trying 2. for over a minute, though.

Expected behavior

When switching between two windows using Alt + Tab, the active window should alternate between those two only.

Actual behavior

When Edge is one of the windows, this sometimes the wrong window switches to the foreground.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.