-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hot reload extra slow for changes in Rider due to backup files with ~ suffix #47912
Comments
Does it only reproduce on MacOS? |
@tmat I just tested on my Windows 11 desktop PC, and it seems to stay very fast despite temporary files being saved and showing up in the console output. Less than 1 second from change to visual change. Maybe this indicates the problem is isolated to Mac, and possibly Apple Silicon Macs (arm64)? I can't say for sure how the Windows PC stacks up against the Mac laptop on performance, but they are generally on par regarding build times in our other projects. Hot reload output on Windows (< 1 second):
|
Thanks for checking. I believe there is a bug in MacOS file system watcher that's causing this. Not sure if in the runtime or in the OS. Will need to investigate further. Note the file system events dotnet-watch receives from the runtime:
If we take this literally it means that a non-existent file was updated, then added and then deleted, which is obviously non-sensical. |
Describe the bug
Hot reload for Blazor Server is significantly slower (~3x) when editing with Rider compared to VSCode. For large code bases, we have seen hot reloads of 20 seconds.
Rider has a
Backup files before saving
option enabled by default, like many other editors, that temporarily saves backup files with~
suffix. This seems to trigger additional hot reloads or at least slow down hot reload.This is a regression when upgrading .NET SDK from .NET 8.0.407 to 9.0.202, and upgrading Blazor app from .NET 8 to .NET 9.
Workaround
Disable
Backup files before saving
in RiderSettings > Appearance & Behavior > System Settings > Autosave
.To Reproduce
dotnet watch --verbose --project Blazor9
and wait for browser to launchwwwroot/app.css
orComponents/Pages/Home.razor
to warm up hot reload (first time is slower)Backup files before saving
option enabled in settingsBackup files before saving
option disabled in settingsRider change with backup file (~3 seconds)
VSCode change (~1 second)
Further technical details
Rider 2024.3.6
andVSCode 1.98.2 (Universal)
Mac M1 Max
(arm64)macOS Sequoia 15.3.2
Related
#45810
#45539
#44910
#47179
https://youtrack.jetbrains.com/issue/RIDER-102534/Backup-save-files-create-temporary-files-suffix-that-prevent-editing
The text was updated successfully, but these errors were encountered: