Bug 165403

Summary: Almost half-second stall scrolling apple.com because of synchronous getPositionInformation
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, enrica, megan_gardner, sam, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch enrica: review+

Description Tim Horton 2016-12-05 12:54:43 PST
getPositionInformation often does a lot of work that it doesn't need to, and is called synchronously from the UI process.

We should try to minimize the work it does to only what is needed, especially when it comes to snapshotting Web content, which is very expensive.
Comment 1 Tim Horton 2016-12-05 14:37:23 PST
rdar://problem/29493285
Comment 2 Tim Horton 2016-12-05 14:37:43 PST
Created attachment 296191 [details]
Patch
Comment 3 Tim Horton 2016-12-05 16:43:11 PST
Created attachment 296217 [details]
Patch
Comment 4 Tim Horton 2016-12-05 17:02:59 PST
ios-sim is not mine
Comment 5 Alex Christensen 2016-12-06 09:25:46 PST
Comment on attachment 296217 [details]
Patch

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

> Source/WebKit2/Shared/AssistedNodeInformation.h:122
> -#endif // InteractionInformationAtPosition_h
> +#endif // AssistedNodeInformation_h

As long as we're changing this, why not pragma once?
Comment 6 Tim Horton 2016-12-06 09:34:51 PST
(In reply to comment #5)
> Comment on attachment 296217 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=296217&action=review
> 
> > Source/WebKit2/Shared/AssistedNodeInformation.h:122
> > -#endif // InteractionInformationAtPosition_h
> > +#endif // AssistedNodeInformation_h
> 
> As long as we're changing this, why not pragma once?

Heh, I did it in the other files but not this one.
Comment 7 Enrica Casucci 2016-12-06 10:09:21 PST
Comment on attachment 296217 [details]
Patch

Looks good.
Comment 8 Tim Horton 2016-12-06 10:25:13 PST
https://trac.webkit.org/changeset/209405