Size limit of User Data Folder #4023
-
Is there a size limit for the User Data Folder? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I don't think there's default size limit for User Data folder in WebView2 but adding @LiangTheDev to confirm. |
Beta Was this translation helpful? Give feedback.
-
A customer of us has asked us this question. I do not know if it does actually happen in reality. |
Beta Was this translation helpful? Give feedback.
-
I don't think that there is a global limit over user data folder size for WebView2. However, most parts in the folder should not grow forever. There is currently one folder that could potentially grow out of control, that is the crash dumps folder. You could get the path of the folder using CoreWebView2Environment.FailureReportFolderPath. If there is a lot of WebView2 browser process crashes, there would be a lot of .dmp files created under that folder. We might limit the number of dmp files in the folder in the future, but before we do that, there is currently a risk that this folder could grow very large and you might have to delete .dmp files from the folder if it has grown too large. There is also auto purge for this folder, but that happens very slow. |
Beta Was this translation helpful? Give feedback.
I don't think that there is a global limit over user data folder size for WebView2. However, most parts in the folder should not grow forever.
For disk caches (like http and code cache) that could grow, Chromium code has some heuristics on the default max size that takes account of available disk space. When the max size target is reached, trimming will happen.
If the app does not visit a lot of sites or having a service worker caching a lot of resources, the default behavior should be OK.
There is a --disk-cache-size Chromium command line switch that you could use to roughly control the max size of each disk cache.
There is currently one folder that could potentially grow out of control,…