开发者

What is better in terms of performance, Use XPath to parse a big HTML file or use preg_match?

开发者 https://www.devze.com 2023-04-10 01:15 出处:网络
What is better in terms of performance, Use XPath to parse a big HTML file or use preg_match to fetch the attributes and text I want on it?

What is better in terms of performance, Use XPath to parse a big HTML file or use preg_match to fetch the attributes and text I want on it?

Because the website has way too many requests so I need a w开发者_JS百科ay to make it very fast to parse the HTML and consuming very low CPU Processing.

Right now I'm using preg_match because I really want performance, Does using Regular Expression make a very big difference in processing? or I should just move to XPath because it doesn't make any difference in terms of speed ?

Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消