MegaCorn

Results 6 comments of MegaCorn

If the inserted node is not a fragment, both vector memory allocations are redundant, which will cause 20% performance degradation ![Image](https://github.com/user-attachments/assets/1c687007-6337-4b86-8678-37e5a9be06f6) ![Image](https://github.com/user-attachments/assets/5f37662e-58a9-4c6c-84ac-b5888a3dbee9)

Can we avoid redundant add_delayed_task operations by judging the node type? Only a few elements need the logic of post_connection_steps. ![Image](https://github.com/user-attachments/assets/0ff8bafa-8c6e-4bd2-b767-240da3accc0a)

Would it be helpful to buffer the content between StartTag and EndTag for tag like

It seems we can begin to buffer content during parsing raw_data https://github.com/servo/html5ever/blob/c3dbaf5cd95ea8f57dd0d3ef7e1578349d5f1310/html5ever/src/tree_builder/mod.rs#L669

Memory allocation is slow on embedded devices, but fast on linux servers. This might the reason why 1.3 has no benefits. Besides, can we avoid the string copy from parser...

Sorry for inconvenience https://github.com/servo/servo/blob/1bbdcb19112b5c23616894b6ce20b950167be5b9/components/script/dom/characterdata.rs#L81 For isuue 3., I have some idea to batch the parsing task In TreeBuilder, when switching to InsertionMode::Text mode, begin to cache data https://github.com/servo/html5ever/blob/c3dbaf5cd95ea8f57dd0d3ef7e1578349d5f1310/html5ever/src/tree_builder/mod.rs#L662 After pop,...