Bug 257478

Summary: Appending an `option` to a `select` forces a style recalc of all options
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: akeerthi, cdumez, karlcow, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Ahmad Saleem
Reported 2023-05-30 04:43:42 PDT
Hi Team, Came across this potential opportunities: Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/19837159fdbebc0033a14887f8436e8edfe75a10 WebKit Source: https://github.com/WebKit/WebKit/blob/22282c4a26cfe887327093bc42513472a26b12fc/Source/WebCore/html/HTMLSelectElement.cpp#L804 Just wanted to raise, if we can get rid of it or it might lead to other bugs? Thanks!
Attachments
Ahmad Saleem
Comment 1 2023-05-31 11:21:28 PDT
Testcase: https://jsfiddle.net/umb93s21/show Safari Technology Preview 170 (in Private Window): Description: Measures performance of adding option elements to a multi-selection select element. Time: values 6392.009987515606, 6243.90243902439, 6344.485749690196, 6384.039900249391, 6448.362720403023, 6376.089663760897, 6236.297198538367, 6259.168704156507, 6198.547215496368, 6168.674698795207, 6408.010012515703, 6432.160804020101, 6368.159203980042, 6236.297198538367, 6198.547215496314, 6305.418719211879, 6392.009987515606, 6400.000000000058, 6376.089663760897, 6360.248447205084 runs/s avg 6326.4259764937015 runs/s median 6364.203825592563 runs/s stdev 86.99574668297977 runs/s min 6168.674698795207 runs/s max 6448.362720403023 runs/s MiniBrowser (build-webkit --release with Patch): Description: Measures performance of adding option elements to a multi-selection select element. Time: values 11743.119266055042, 11743.11926605506, 11743.119266055046, 11681.877444589309, 11773.981603153745, 11743.11926605506, 11758.530183727034, 11697.127937336842, 11712.418300653637, 11758.530183727005, 11651.495448634645, 11712.41830065365, 11758.530183727034, 11773.981603153745, 11712.418300653595, 11743.119266055019, 11789.473684210527, 11681.877444589365, 11727.748691099505, 11666.66666666675 runs/s avg 11728.63361534258 runs/s median 11743.11926605503 runs/s stdev 38.0371407071838 runs/s min 11651.495448634645 runs/s max 11789.473684210527 runs/s
Radar WebKit Bug Importer
Comment 2 2023-06-06 04:44:19 PDT
Ahmad Saleem
Comment 3 2023-06-10 15:51:00 PDT
Description: Measures performance of adding option elements to a multi-selection select element. Time: values 13264.248704663229, 11399.491094147596, 11428.571428571442, 11443.167305236264, 11428.571428571442, 11457.800511508965, 11443.167305236297, 11414.01273885349, 11428.571428571442, 11428.571428571402, 11399.491094147583, 11385.006353240153, 11399.491094147555, 11385.006353240153, 11428.57142857143, 11457.800511508978, 11313.131313131313, 11313.131313131287, 11443.167305236191, 11443.167305236218 runs/s avg 11505.206872276121 runs/s median 11428.571428571435 runs/s stdev 415.9965649810432 runs/s min 11313.131313131287 runs/s max 13264.248704663229 runs/s _____________ Description: Measures performance of adding option elements to a multi-selection select element. Time: values 11636.36363636364, 11666.666666666666, 11727.748691099483, 11651.495448634576, 11651.49544863459, 11651.495448634576, 11666.666666666639, 11651.49544863459, 11591.203104786533, 11531.531531531531, 11636.363636363663, 11789.473684210527, 11820.580474934008, 11805.006587615228, 11773.981603153745, 11758.530183727034, 11805.006587615284, 11805.00658761534, 11836.195508586554, 11805.006587615284 runs/s avg 11713.065676654474 runs/s median 11697.207678883075 runs/s stdev 89.267576549425 runs/s min 11531.531531531531 runs/s max 11836.195508586554 runs/s _________ Only slight increase on like to like build.
Note You need to log in before you can comment on or make changes to this bug.