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

Synchronous functionality when passing raw html #91

Open
krazyjakee opened this issue Jul 13, 2017 · 2 comments
Open

Synchronous functionality when passing raw html #91

krazyjakee opened this issue Jul 13, 2017 · 2 comments

Comments

@krazyjakee
Copy link

krazyjakee commented Jul 13, 2017

There is no reason the parser should run asynchronously when passing raw html as there is no request to be made.

Usage should be something like...

const readability = read(rawHtml);
// readability = { err, article, meta }
@mhamann
Copy link
Contributor

mhamann commented Jul 13, 2017

Not true. The read/parse logic could be CPU intensive and block for quite awhile. With promises and async/await, it shouldn't make much difference, except for not blocking the main thread (which is a good thing!).

@krazyjakee
Copy link
Author

krazyjakee commented Jul 13, 2017

@mhamann doh! I should have thought about that. I would be satisfied with a promise/asyncawait solution too but then may as well do a total ES8 rewrite. I don't have time for it unfortunately.

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

2 participants