Reputation: 166
My node.js http server has a response time of 2-3ms on localhost. But when I don't use it for a minute the "first" requests take around 300-400ms. After that node.js is fast again.
var http = require('http');
var server = http.createServer(function(request, response){
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Hello");
});
server.listen(90);
Is there some kind of sleep mode for V8 or does it drop the JIT information when they're not in use for a while?
Upvotes: 1
Views: 1838
Reputation: 166
As jfriend00
said in his comment: node.js seems to go into sleep mode when it's not in use it seems to be a Windows issue, not a node.js one.
Upvotes: 2