Separate watch from nunjucks / 100% CPU Issues
See original GitHub issueHi, the code below causes nunjucks to use 100% of one CPU core. It makes no difference if i use different template contents, different contexts or the asyc api.
Nunjucks version: 1.1.0 Node Version: v0.10.31
var nunjucks = require('nunjucks');
nunjucks.renderString('my template', {});
setTimeout(function(){}, 1000*3600);
Issue Analytics
- State:
- Created 9 years ago
- Comments:18 (15 by maintainers)
Top Results From Across the Web
think-view-nunjucks 1.0.7 | Snyk
Learn more about think-view-nunjucks@1.0.7 vulnerabilities. think-view-nunjucks@1.0.7 has 7 known ... Issues · Dependencies. Severity. Critical. High.
Read more >How to fix 100% CPU Utilization Bug (When no ... - YouTube
For those who want to give a little thanks, I just set up a page over at buymeacoffee as a new way to...
Read more >100% CPU Usage and How to Fix It 🖥️ - YouTube
In this video, I will show you what to do if the CPU in your computer is at 100 % usage all the...
Read more >High CPU Load - keystone - Google Groups
My problem is that after starting node and loading the main page (/), the CPU load of node will be almost 100% and...
Read more >High CPU usage on Mac Sierra with 3143 - Technical Support ...
My CPU usage just keeps climbing until i have to shut down Sublime. It's been this way for a good number of prior...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In case anyone else is looking for a temporary workaround, this is what I am using:
The CPU issue looks to be fixed after upgrading to a much better version of chokidar: https://github.com/mozilla/nunjucks/pull/405
I’ve been working on separate the watcher, but I’m not entirely sure it’s a great idea anymore. Technically it’s just hard – how do I take a watcher from the user and use it? The only way to do this is to standardize an interface and force the user to load in a watcher compatible with it and install it. That’s just too much work in my opinion for a feature that should be builtin.
What I think we can do is support multiple watchers. If someone wants to make a PR to take a
watcher
option that specifies either chokidar or some other watcher, I would be open to it