Finished testing a small patch:
It only prioritizes <script> loading in <body> (not sure yet why
doesn't work in <head>).
Assuming most external-load slowdowns are caused by js from body vs
anything from head, this should fix most horrific worst cases.

Tested on
    First paint time unpatched:  80 seconds in
    First paint time patches:      34 seconds in

Real-world test:
    First paint time unpatched: 5 seconds
    First paint time patched:     2 seconds

Please help test and see if it breaks anything. Didn't see any breaks
here yet :)

If someone wants to help see if there will be any more improvement by
adding the heuristic for js in <head> or for css in both head/body,
please let know.
For now, was thinking about twiddling with
CachedResourceLoader::preload, but that might be too late if the
engine already blocked on some css.

p.s. if generally patches are discussed off-list, please kindly let
know the correct venue.

webkit-dev mailing list

Reply via email to