Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite this one in C(++) or reduce functionality #1

Open
akidee opened this issue Aug 2, 2010 · 5 comments
Open

Rewrite this one in C(++) or reduce functionality #1

akidee opened this issue Aug 2, 2010 · 5 comments

Comments

@akidee
Copy link

akidee commented Aug 2, 2010

Making it dirty like this http://github.com/tautologistics/node-htmlparser/blob/master/utils_example.js is so much faster! I have rewritten a piece of code from PHP to node and Apricot is really slow compared to that for big and many HTML files.

@silentrob
Copy link
Owner

Rewrite what? Are you able to provide some bench marks? If you just want a fast parser, use htmlparser.

@akidee
Copy link
Author

akidee commented Aug 3, 2010

Yes, I am still using htmlparser for parsing and it's pretty fast. I have tried to get elements with sizzle selectors. Doing it manually with the rudimentary DOM support of htmlparser is many times faster. I will provide you some benchmarks in some days.

@felixge
Copy link

felixge commented Aug 23, 2010

I'm having some performance troubles as well. Consider the following code:

https://gist.github.com/97db243b2ba3a3f9f458

time node index.js
Documented loaded
Elements found

real    0m15.752s
user    0m12.399s
sys 0m0.061s

Pretty much all of those 15 seconds are spend on executing the find('a') call on the document, so something seems wrong here.

--fg

@silentrob
Copy link
Owner

Interesting, thanks, ill dig in.

@felixge
Copy link

felixge commented Aug 23, 2010

Thanks for the quick reply. I was thinking of creating a small node app that lists all existing node.js modules by scraping various sources and lets you sorts things by github forks or google backlinks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants