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

thymol-node performance #19

Open
tburny opened this issue Oct 28, 2016 · 2 comments
Open

thymol-node performance #19

tburny opened this issue Oct 28, 2016 · 2 comments

Comments

@tburny
Copy link

tburny commented Oct 28, 2016

We are using thymol-node as engine for the Node.js variant of Patternlab. However we experienced that compared to the compile speeds of other users(typically 5-10 seconds), Thymol is about a magnitude slower.
We were using a combination of jsdom and jQuery to build about 130 templates with a total size of ~ 1,2 MB, which took 90 seconds. By replacing jsdom with Domino, we could bring compile times down to about 30 seconds. However, Domino has a slightly different attribute handling, as described in fgnass/domino#27.
Therefor we had to patch Thymol and would be happy to contribute a technology independent pull request.

Further speed improvements could be archieved by switching to a widely known library such as https://github.com/cheeriojs/cheerio which basically combines the power of jQuery with an 8 times speed improvement over jsdom. However this would required more severe changes to the codebase.

Why is jQuery required by thymol-node anyways when it is only used for simple things like finding elements?

@jjbenson
Copy link
Contributor

I'm very pleased to hear that you've found an interesting and innovative use for Thymol and would be happy to help in any way I can.
Could you please open a discussion on the user forum?

@jjbenson
Copy link
Contributor

The latest builds (2.0.1-pre.5) of thymol and thymol-node do not require jQuery.

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