topPrivatelyControlledDomain is slow
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Oct 2018 10:20:34 +0000 (10:20 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Oct 2018 10:20:34 +0000 (10:20 +0000)
commit5646006bf41b906ff258d54931c36c4d5eb71fe1
treef40e94777e7c1223b1186fd4428ab546654c8198
parent40b5e5f3001ada8a8cb9c59f1b354c7b25c8e3ed
topPrivatelyControlledDomain is slow
https://bugs.webkit.org/show_bug.cgi?id=190792

Reviewed by Alex Christensen and Chris Dumez.

It calls into some slowish CFNetwork code and ends up showing up in profiles.

* platform/mac/PublicSuffixMac.mm:
(WebCore::topPrivatelyControlledDomain):

Add a cache that avoids calls into frameworks.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/PublicSuffixMac.mm