Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4b9d31c3a99905ac9d003167241760c57f757882
      
https://github.com/WebKit/WebKit/commit/4b9d31c3a99905ac9d003167241760c57f757882
  Author: Ryan Reno <[email protected]>
  Date:   2025-09-18 (Thu, 18 Sep 2025)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/fast/frames/lots-of-iframes.html
    M LayoutTests/fast/frames/lots-of-objects.html

  Log Message:
  -----------
  fast/frames/lots-of-iframes.html and fast/frames/lots-of-objects.html are 
flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=298471
rdar://159964738

Reviewed by Sammy Gill and Brent Fulgham.

fast/frames/lots-of* tests attempt to test the limit placed on <iframe> and 
<object>
element document creation by creating 1001 of each and testing that the 1001th 
was blocked.
This can be really slow in debug builds. I measured about 12 sec/test on 
average for
fast/frames/lots-of-iframes.html and a little under 11 sec/test for 
fast/frames/lots-of-objects.html
on a M4 Max MacBook Pro. The result of this is that we often see flaky timeouts 
of these tests in
our test infrastructure.

In an attempt to improve the situation I tried to optimize the tests to reduce 
runtime using some modern
web technologies. Things such as MutationObserver and lazy iframe loading.

On average I saw a 50% reduction in runtime on fast/frames/lots-of-iframes.html 
and a 20-25% reduction
in runtime on fast/frames/lots-of-objects.html in debug builds on the M4 Max.

Both use similar techniques. There exist more optimization opportunities for 
iframes so I was able to
get a better result from that test.

* LayoutTests/TestExpectations:
* LayoutTests/fast/frames/lots-of-iframes.html:
    When we create iframes we set the style of the element specifically to 
avoid layout (display: none)
    and to allow for lazy loading by forcing the frame to be off screen 
(position: absolute, top: 9999px).
* LayoutTests/fast/frames/lots-of-objects.html:
    <object> elements will not attempt to load their documents if they have 
display: none so we use
    visibility: hidden to avoid any extra work when we load the first 1k 
objects.

Canonical link: https://commits.webkit.org/300174@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to