servo/components
Mukilan Thiyagarajan bd807e3338 script: optimize doc.createElement for uncustomized built-in elements
The investigation in #37745 revealed that `Element::create` spends ~39%
of its runtime in `set_custom_element_state`. For built-in, uncustomized
elements this overhead is unnecessary as they are equivalent to being
initialized in the "uncustomized" state. This particular call to
`set_custom_element_state` can't simply be removed as this call also
ensured that the element's DEFINED state is set to 'true', to match
`:defined` selectors, based on the custom element state.

So, introduce a new method that will only set the
`ElementState::DEFINED` flag and call it from `Element::create` when
creating uncustomized, built-ins.

For more information about the peformance improvements, please refer to
[this comment][1].

[1]: https://github.com/servo/servo/issues/37745#issuecomment-3305477287

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2025-09-18 13:52:19 +05:30
..
allocator Moves to FxHashMap for Allocator, BHM, Canvas, Media, Servo, WebGL and WebGPU (#39202) 2025-09-08 16:06:03 +00:00
background_hang_monitor generic channel: Migrate background hang monitor to GenericChannel (#39345) 2025-09-17 11:11:07 +00:00
bluetooth EmbedderMsg: port reply channels to GenericChannel (#39018) 2025-08-29 12:44:21 +00:00
canvas canvas: Port CanvasMsg channel to generic channel (#39348) 2025-09-18 00:06:08 +00:00
compositing Removed FnvHash and transformed the rest to FxHashmap (#39233) 2025-09-10 13:34:54 +00:00
config profile: Remove integration with Instruments.app "Points of Interest" (#39354) 2025-09-18 02:37:00 +00:00
constellation canvas: Port CanvasMsg channel to generic channel (#39348) 2025-09-18 00:06:08 +00:00
deny_public_fields
devtools Removed FnvHash and transformed the rest to FxHashmap (#39233) 2025-09-10 13:34:54 +00:00
dom_struct
domobject_derive
fonts Removed FnvHash and transformed the rest to FxHashmap (#39233) 2025-09-10 13:34:54 +00:00
geometry layout: Use FastTransform for hit testing (#38554) 2025-08-11 16:23:17 +00:00
hyper_serde cargo: Bump rustc to 1.89 (#36818) 2025-08-19 11:07:53 +00:00
jstraceable_derive
layout layout: Make lines non-phantom if they have inline padding/border/margin (#39058) 2025-09-16 22:18:46 +00:00
malloc_size_of layout: Measure stacking context tree in layout thread memory report (#38762) 2025-08-21 07:21:59 +00:00
media Moves to FxHashMap for Allocator, BHM, Canvas, Media, Servo, WebGL and WebGPU (#39202) 2025-09-08 16:06:03 +00:00
metrics tidy: Add a rule ensuring that // comments are followed by a space in Rust (#38698) 2025-08-18 12:09:09 +00:00
net net: use log::error! to handle DevTools startup failures gracefully (#39320) 2025-09-16 01:55:16 +00:00
pixels layout: Convert animated image delays < 10ms into 100 ms delays (#39189) 2025-09-08 14:16:21 +00:00
profile allocator: Add optional heap allocation measurement tracking. (#38727) 2025-08-19 18:49:27 +00:00
rand
range
script script: optimize doc.createElement for uncustomized built-in elements 2025-09-18 13:52:19 +05:30
script_bindings script_bindings(python): Handle WebIDL methods named with Rust keywords (#39343) 2025-09-17 04:09:02 +00:00
servo libservo: Remove Opts::webrender_stats and -Z wr-stats (#39331) 2025-09-17 11:58:16 +00:00
servo_tracing
shared profile: Remove integration with Instruments.app "Points of Interest" (#39354) 2025-09-18 02:37:00 +00:00
timers cargo: Remove unused dependency (#38239) 2025-07-23 13:32:50 +00:00
url script: Do not include fragments when comparing URLs in CookieStore (#38876) 2025-08-27 23:41:11 +00:00
webdriver_server webdriver: Support "scroll into view" for commands (#38508) 2025-09-12 06:07:58 +00:00
webgl Moves to FxHashMap for Allocator, BHM, Canvas, Media, Servo, WebGL and WebGPU (#39202) 2025-09-08 16:06:03 +00:00
webgpu chore: update wgpu to v26 (#39016) 2025-09-14 04:09:17 +00:00
webxr webxr: Fix compile warning for Windows after upgrade to rustc 1.89 (#38780) 2025-08-19 14:23:39 +00:00