[webkit-changes] [WebKit/WebKit] 93a78b: Stop updating modification time of origin file for...

Sihui noreply at github.com
Fri Oct 20 15:26:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 93a78bc98d017d5b14d3fe642d9380347090c75b
      https://github.com/WebKit/WebKit/commit/93a78bc98d017d5b14d3fe642d9380347090c75b
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2023-10-20 (Fri, 20 Oct 2023)

  Changed paths:
    M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp
    M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm

  Log Message:
  -----------
  Stop updating modification time of origin file for every granted space request
https://bugs.webkit.org/show_bug.cgi?id=263416
rdar://problem/117228957

Reviewed by Youenn Fablet.

We use last modification time of origin file to help decide data eviction ordering of origins, and we currently update
the time when a space request is granted for the origin. In real-world scenario, an origin might perform many storage
operations in a short period of time, leading to many last modification time updates. This is not ideal because the
timestamp may not change (or the change may not be big enough to affect eviction ordering), and updating modification
time is not free -- it could be slow when disk operation is involved, slowing down subsequent storage operations
on the same queue. To fix this, we now only update last modification time when at least 30 seconds have passed since
last update.

This change makes our existing IndexedDB tests run faster (`run-perf-tests IndexedDB/`).

* Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:
(WebKit::NetworkStorageManager::updateLastModificationTimeForOrigin):
* Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/269598@main




More information about the webkit-changes mailing list