Skip to content

Commit a86e668

Browse files
committed
Improve performance of text node allocation by marking the text node construction as always inline
1 parent acdf63b commit a86e668

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/dom/html5_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static const php_dom_ns_magic_token *get_libxml_namespace_href(uintptr_t lexbor_
7373
}
7474
}
7575

76-
static xmlNodePtr lexbor_libxml2_bridge_new_text_node_fast(xmlDocPtr lxml_doc, const lxb_char_t *data, size_t data_length, bool compact_text_nodes)
76+
static zend_always_inline xmlNodePtr lexbor_libxml2_bridge_new_text_node_fast(xmlDocPtr lxml_doc, const lxb_char_t *data, size_t data_length, bool compact_text_nodes)
7777
{
7878
if (compact_text_nodes && data_length < LXML_INTERNED_STRINGS_SIZE) {
7979
/* See xmlSAX2TextNode() in libxml2 */

0 commit comments

Comments
 (0)