开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜