Open Bug 1943230 Opened 22 days ago Updated 4 days ago

Perf comparison of creating large number of input type elements, and the perf of reloading page full of elements

Categories

(Core :: DOM: Forms, defect)

defect

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Depends on 3 open bugs)

Details

Attachments

(22 files)

Spurred by bug 1939344 (and bug 1941140) and undeterred by bug 1942561 I am now profiling the following for all HTML Input Elements:

  • Creating a page full of input elements and comparing it to Chrome
  • Reloading a page full of input elements for all possible input element types
**** **** Nightly **** Chrome **** **** ****
Input element Number of elements Profile of generating the elements Time taken (ms) Profile of generating the elements Time taken (ms) Comment Nightly- Perf of reloading a generated page
Button 450,000 https://share.firefox.dev/3CndhyX 2200 https://share.firefox.dev/4apI0Il 4700 Nightly is faster https://share.firefox.dev/3E1OQHE
Color 150,000 https://share.firefox.dev/3WysMLd 1500 https://share.firefox.dev/3WuTbtc 3800 Nightly is faster https://share.firefox.dev/3Cj4RIM
File 150,000 https://share.firefox.dev/3EgARhc 5200 https://share.firefox.dev/4huanHH 8600 Nightly is faster https://share.firefox.dev/4jrUGlV
Hidden 1,500,000 https://share.firefox.dev/4h8QYMG 4100 https://share.firefox.dev/40JmFpU 7800 Nightly is faster https://share.firefox.dev/3WuIVRM
Image 250,000 https://share.firefox.dev/4arizWA 8000 https://share.firefox.dev/3PO5Qnm 18000 Nightly is faster https://share.firefox.dev/4g9IJOQ
Number 50,000 https://share.firefox.dev/4jupimI 2700 https://share.firefox.dev/3E9FvOb 1900 Nightly is slower https://share.firefox.dev/42piYa1
Password 150,000 https://share.firefox.dev/4h54SPQ 18000 https://share.firefox.dev/4hs0udu 2900 Nightly is very slow https://share.firefox.dev/4aviEc8
Range 150,000 https://share.firefox.dev/4aslDC2 4300 https://share.firefox.dev/3Cgic4L 5800 Nightly is faster https://share.firefox.dev/42mGkgu
Reset button 400,000 https://share.firefox.dev/4hsBDGe 3600 https://share.firefox.dev/4jvaxQD 7600 Nightly is faster https://share.firefox.dev/4ap8r0J
Search 150,000 https://share.firefox.dev/4jtrNpn 13000 https://share.firefox.dev/3PN5ZYn 11000 Nightly is slower https://share.firefox.dev/4h5jbUj
Submit 450,000 https://share.firefox.dev/3E6uywS 7800 https://share.firefox.dev/3E7Ge2j 10000 Nightly is faster https://share.firefox.dev/3WS3vvV
Text 150,000 https://share.firefox.dev/3ClhJ16 10000 https://share.firefox.dev/3WuWxwl 6000 Nightly is slower https://share.firefox.dev/4apL1ID
URL 150,000 https://share.firefox.dev/3PJS0m2 11000 https://share.firefox.dev/4aqzWaf 6000 Nightly is slower https://share.firefox.dev/3WuHsLp
Email 150,000 https://share.firefox.dev/4jpiGGp 12000 https://share.firefox.dev/3E6NjjK 5700 Nightly is slower https://share.firefox.dev/4jwdhgT
Tel 150,000 https://share.firefox.dev/3E3NL29 13000 https://share.firefox.dev/3Wt3qOV 7400 Nightly is slower https://share.firefox.dev/3WtNgF5
Time 15,000 https://share.firefox.dev/3E3NQmt 18000 https://share.firefox.dev/4jwdXmr 1800 Nightly is way slower and uses way more memory (2.4GB) https://share.firefox.dev/3EgUWnz
Week 50,000 https://share.firefox.dev/4ga34nn 1800 https://share.firefox.dev/4jtuRln 5100 Nightly doesn’t seem to support this input type? https://share.firefox.dev/4hnkQV6
Month 50,000 https://share.firefox.dev/3ClLGhs 2200 https://share.firefox.dev/40N0IGI 7800 Nightly is faster https://share.firefox.dev/4hi6aqw
Date 15,000 https://share.firefox.dev/40HnHCR 18000 https://share.firefox.dev/42rDMxI 1700 Nightly is way slower and uses way more memory (4GB) N/A- the page regenerates the elements on reload
Datetime-Local 15,000 https://share.firefox.dev/4apWHLn 21000 https://share.firefox.dev/4avBzTX 3200 Nightly is way slower and uses way more memory (4GB) N/A- the page regenerates the elements on reload

Emilio had found something worth fixing in the image loading testcase, showed some initial interest in looking at profiles and suggested that a comparison with Chrome would be useful.
Note that the comparison between Firefox and Chrome is only for generating the page. The "Reload" perf has not been compared - the idea being that for reload any extra work should be avoided regardless of perf difference.
All testcases were geenrated by chatpgpt, with only minor edits to remove extra styling.
cc emilio and dholbert.

Attached file Layout.xlsx
Attached file Button.html
Attached file Color.html
Attached file Date.html
Attached file DateTime-Local.html
Attached file Email.html
Attached file File.html
Attached file Hidden.html
Attached file Image.html
Attached file Month.html
Attached file Number.html
Attached file Password.html
Attached file Range.html
Attached file Reset.html
Attached file Search.html
Attached file Submit.html
Attached file Tel.html
Attached file Text.html
Attached file Time.html
Attached file URL.html
Attached file Week.html
Flags: needinfo?(emilio)

I think those dependencies are the most problematic, thanks for doing this.

Flags: needinfo?(emilio)

Thanks for the work!

Severity: -- → S3

The ones using UAWidgets (date and such) aren't very surprising. UAWidget setup is very slow. Luckily those elements are such that pages rarely have many of them.

Attached file Video elements.HTML

The perf difference of creating 5000 video elements is bad. By whatever magic, 5000 video elements are visible in Chrome in 1.2 seconds. We take 21s for the elements to appear.

nightly: https://share.firefox.dev/4hubYgE (21s+ 11s)
Chrome: https://share.firefox.dev/4aunyps (all video element visible after 1.2 seconds!)

Could you file a separate bug for that. Looks like UAWidget for video element is flushing style and whatnot.

See Also: → 1943629

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #26)

Could you file a separate bug for that. Looks like UAWidget for video element is flushing style and whatnot.

Filed bug 1943629

See Also: → 1943648
See Also: → 1943746
See Also: → 1943729, 1943735
See Also: → 1943841
See Also: → 1943843
See Also: → 1943848
See Also: → 1943857
See Also: → 1943856
See Also: → 1943859
See Also: → 1943860
See Also: → 1943862
See Also: → 1943000, 1942562, 1942557
See Also: → 1944299
See Also: → 1944325
See Also: → 1944331
See Also: → 1944751
See Also: → 1945310
See Also: → 1945313
See Also: → 1945316
See Also: → 1945361
See Also: → 1945382
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: