[Webkit-unassigned] [Bug 192943] Moving non-critical initializations to a parallel thread can speed up process launch time by 15%.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 20 13:47:40 PST 2018


--- Comment #7 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 357860
  --> https://bugs.webkit.org/attachment.cgi?id=357860

View in context: https://bugs.webkit.org/attachment.cgi?id=357860&action=review

> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:368
> +    m_internalQueue = dispatch_queue_create([NSString stringWithFormat:@"com.apple.WebKit.WebProcessCocoa"].UTF8String, DISPATCH_QUEUE_SERIAL);

I believe you should adoptOSObject(), otherwise you increment the ref count again and this leaks.

Why aren't we setting a BACKGROUND QoS class like my code was doing?

dispatch_queue_attr_t attr = DISPATCH_QUEUE_SERIAL;
attr = dispatch_queue_attr_make_with_qos_class(attr, QOS_CLASS_BACKGROUND, 0);
m_internalQueue = dispatch_queue_create("com.apple.WebKit.WebProcessCocoa", attr);

Note that if you used WTF::WorkQueue, you'd simply pass the QoS when constructing it.

I also do not understand the purpose of [NSString stringWithFormat] in your code, you're not formatting anything and you do not need a NSString*.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181220/00abe459/attachment.html>

More information about the webkit-unassigned mailing list