RESOLVED FIXED Bug 113603
"Empty cache..." clears the disk cache from each WebProcess
https://bugs.webkit.org/show_bug.cgi?id=113603
Summary "Empty cache..." clears the disk cache from each WebProcess
Brady Eidson
Reported 2013-03-29 13:29:37 PDT
"Empty cache..." clears the disk cache from each WebProcess This is silly - Just once from the network process will suffice.
Attachments
Patch v1 (7.74 KB, patch)
2013-03-29 13:39 PDT, Brady Eidson
sam: review+
eflews.bot: commit-queue-
Brady Eidson
Comment 1 2013-03-29 13:30:14 PDT
Brady Eidson
Comment 2 2013-03-29 13:39:16 PDT
Created attachment 195790 [details] Patch v1
EFL EWS Bot
Comment 3 2013-03-29 13:42:43 PDT
Early Warning System Bot
Comment 4 2013-03-29 13:46:14 PDT
Sam Weinig
Comment 5 2013-03-29 13:54:24 PDT
Comment on attachment 195790 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=195790&action=review > Source/WebKit2/NetworkProcess/NetworkProcess.h:131 > +#if PLATFORM(MAC) > + dispatch_group_t m_clearCacheDispatchGroup; > +#endif Please add a FIXME and file a bug about doing this in a way that doesn't require an #ifdef. e.g. Using a WorkQueue and BinarySemaphore. > Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp:121 > // FIXME (Multi-WebProcess): <rdar://problem/12239765> There is no need to relaunch all processes. One process to take care of persistent cache is enough. > context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::ClearCacheForAllOrigins(cachesToClear)); Do we still want to send this if we are using the network process?
Brady Eidson
Comment 6 2013-03-29 14:15:56 PDT
(In reply to comment #5) > (From update of attachment 195790 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=195790&action=review > > > Source/WebKit2/NetworkProcess/NetworkProcess.h:131 > > +#if PLATFORM(MAC) > > + dispatch_group_t m_clearCacheDispatchGroup; > > +#endif > > Please add a FIXME and file a bug about doing this in a way that doesn't require an #ifdef. e.g. Using a WorkQueue and BinarySemaphore. Due to "popular request", I'm doing that now. > > > Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp:121 > > // FIXME (Multi-WebProcess): <rdar://problem/12239765> There is no need to relaunch all processes. One process to take care of persistent cache is enough. > > context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::ClearCacheForAllOrigins(cachesToClear)); > > Do we still want to send this if we are using the network process? Yes - WebProcesses still need to clear their individual memory caches.
Brady Eidson
Comment 7 2013-03-29 14:27:17 PDT
(In reply to comment #6) > (In reply to comment #5) > > (From update of attachment 195790 [details] [details]) > > > > Please add a FIXME and file a bug about doing this in a way that doesn't require an #ifdef. e.g. Using a WorkQueue and BinarySemaphore. > > Due to "popular request", I'm doing that now. > Or, maybe not. A binary semaphore isn't good enough. We'd need a counting semaphore. That's why the WebResourceCacheManager version of this code uses dispatch_group; It has to handle multiple requests to clear and wait for all of them to complete. I'll definitely add the FIXME about this but WorkQueue and/or Semaphore improvements are definitely needed before they can be a solution to this problem.
Brady Eidson
Comment 8 2013-03-29 14:31:02 PDT
Csaba Osztrogonác
Comment 9 2013-03-30 02:03:17 PDT
(In reply to comment #8) > http://trac.webkit.org/changeset/147251 And buildfix for !ENABLE(NETWORK_PROCESS) landed in http://trac.webkit.org/changeset/147268. Otherwise are you planning to review network process patches to let enable network process for other ports? https://bugs.webkit.org/show_bug.cgi?id=108832 Positive and/or negative review would be welcome ...
Brady Eidson
Comment 10 2013-03-30 09:51:29 PDT
(In reply to comment #9) > (In reply to comment #8) > > http://trac.webkit.org/changeset/147251 > > And buildfix for !ENABLE(NETWORK_PROCESS) landed in > http://trac.webkit.org/changeset/147268. > > Otherwise are you planning to review network process patches to let > enable network process for other ports? https://bugs.webkit.org/show_bug.cgi?id=108832 > > Positive and/or negative review would be welcome ... From https://bugs.webkit.org/show_bug.cgi?id=108832 - "Let's do this in smaller steps" seems like extremely good feedback!!!
Csaba Osztrogonác
Comment 11 2013-03-31 01:51:08 PDT
> From https://bugs.webkit.org/show_bug.cgi?id=108832 - "Let's do this in smaller steps" seems like extremely good feedback!!! Balázs - the author of the patch - said it, and then filed many bug reports for it 1.5 months before. But after it, I can't see any feedback from the WebKit2 authors.
Note You need to log in before you can comment on or make changes to this bug.