Bug 208669 - Pre-fetch first page in new PDF loading model
Summary: Pre-fetch first page in new PDF loading model
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-05 15:39 PST by Brady Eidson
Modified: 2020-03-05 19:00 PST (History)
3 users (show)

See Also:


Attachments
Patch (4.81 KB, patch)
2020-03-05 15:44 PST, Brady Eidson
achristensen: review+
Details | Formatted Diff | Diff
PFL (4.87 KB, patch)
2020-03-05 16:12 PST, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2020-03-05 15:39:23 PST
Pre-fetch first page in new PDF loading model
Comment 1 Brady Eidson 2020-03-05 15:44:19 PST
Created attachment 392638 [details]
Patch
Comment 2 Alex Christensen 2020-03-05 15:54:28 PST
Comment on attachment 392638 [details]
Patch

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

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:98
> +-(void) preloadDataOfPagesInRange:(NSRange)range onQueue:(dispatch_queue_t)queue completion:(void (^)(NSIndexSet* loadedPageIndexes))completionBlock;

Space in wrong place.
Same with previous line.

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:711
> +    auto firstPageQueue = WorkQueue::create("PDF first page work queue");

We should reuse this.
Comment 3 Brady Eidson 2020-03-05 16:11:24 PST
(In reply to Alex Christensen from comment #2)
> Comment on attachment 392638 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=392638&action=review
> 
> > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:98
> > +-(void) preloadDataOfPagesInRange:(NSRange)range onQueue:(dispatch_queue_t)queue completion:(void (^)(NSIndexSet* loadedPageIndexes))completionBlock;
> 
> Space in wrong place.
> Same with previous line.
> 
> > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:711
> > +    auto firstPageQueue = WorkQueue::create("PDF first page work queue");
> 
> We should reuse this.

There's only ever one per PDFPlugin, and there's (generally) only ever one PDFPlugin per WebContent process.

So I agree in principal, but in practice it's a non-issue.
Comment 4 Brady Eidson 2020-03-05 16:12:59 PST
Created attachment 392643 [details]
PFL
Comment 5 Radar WebKit Bug Importer 2020-03-05 18:16:36 PST
<rdar://problem/60112775>
Comment 6 Radar WebKit Bug Importer 2020-03-05 18:16:37 PST
<rdar://problem/60112772>
Comment 7 WebKit Commit Bot 2020-03-05 19:00:06 PST
Comment on attachment 392643 [details]
PFL

Clearing flags on attachment: 392643

Committed r257964: <https://trac.webkit.org/changeset/257964>
Comment 8 WebKit Commit Bot 2020-03-05 19:00:08 PST
All reviewed patches have been landed.  Closing bug.