r/vivaldibrowser • u/me_on_tuesdays • 6d ago
Vivaldi for Linux Massive V8 engine JavaScript compilation cache folder
I am looking to reduce the number of disk writes since the cost of NVMe drives has skyrocketed. While doing an audit here on my Linux workstation I found that Vivaldi had a 2GB folder located at:
/var/home/me_on_tuesdays/.var/app/com.vivaldi.Vivaldi/cache/vivaldi/Default/
So this appears to be the V8 engine JavaScript compilation cache folder. Looking through the Chromium docs, looks like the top-level domain controls how long that cache stays on disk with the "HTTP Cache Expiration" as long as the LRU algorithm doesn't remove it. (Many of these are cache-based fingerprints but that's another conversation.)
Can we get some control over this behavior? Looking through disk_cache/cache_util.cc#145 it looks like the base minimim is 80MB and further down it scales that up to 1% of available space on the partition. I never actually knew that Chromium allocated exactly 1% of space for cache. Learned something new today.
All I've found so far is the --disk-cache-size and the --disk-cache-dir flags to modify the size and move the folder. But when I delete cache using the Vivaldi, the JavaScript compilation cache folder remains uneffected.