-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
memoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.
Description
- Version: 8.4.0
- Platform: Linux version 3.10.0-514.10.2.el7.x86_64
- Subsystem: CentOS Linux release 7.3.1611 (Core)
My project is using express.js, and having a code fragment like this:
conse {URL} = require('url');
const express = require('express');
const router = express.Router();
router.put('', (req, res) => {
let data = req.body.flow ? JSON.parse(req.body.flow) : {};
if (data.url && !data.domain) {
data.domain = new URL(data.url).hostname;
}
res.send();
})When many request come in, the project memory will rise slowly ,and sometimes it will drop a little. but in general it's still up. When i change to url.parse(), the memory looks normal. I use PM2 to look memory.
What's the difference between the two(new URL and url.parse) in memory or gc?
Metadata
Metadata
Assignees
Labels
memoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.