Bug 165403 - Almost half-second stall scrolling apple.com because of synchronous getPositionInformation
Summary: Almost half-second stall scrolling apple.com because of synchronous getPositi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-05 12:54 PST by Tim Horton
Modified: 2016-12-06 10:25 PST (History)
5 users (show)

See Also:


Attachments
Patch (49.63 KB, patch)
2016-12-05 14:37 PST, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (51.87 KB, patch)
2016-12-05 16:43 PST, Tim Horton
enrica: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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