You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
I create 20 projects with the following gulpfile attached below. It need set the "--max-old-space-size=8192". My question is why it needs so much memory?
When i add this code to gulp-typescript compiler.js in the bottom of "inputDone" function.
inputDone() {
...
this.program = undefined; --- the added
this.project.output.finish(result);
}
Then it is ok, it does not need so much memory.
So, do i have method to release the typescript program in the gulpfile?
The text was updated successfully, but these errors were encountered:
ericcaigm
changed the title
Gulp-typescript need greater memory when the numbers of projects increase
Gulp-typescript needs greater memory when the numbers of projects increase
Sep 7, 2020
Expected behavior:
I create 20 projects with the following gulpfile attached below. It need set the "--max-old-space-size=8192". My question is why it needs so much memory?
When i add this code to gulp-typescript compiler.js in the bottom of "inputDone" function.
inputDone() {
...
this.program = undefined; --- the added
this.project.output.finish(result);
}
Then it is ok, it does not need so much memory.
So, do i have method to release the typescript program in the gulpfile?
Actual behavior:
Your gulpfile:
const packages: IotSdkPackage[] = [
{
name: 'common',
project: createProject('src/common/tsconfig.json'),
},
{
name: 'log-serverless',
project: createProject('src/log-serverless/tsconfig.json'),
},
{
name: 'utils',
project: createProject('src/utils/tsconfig.json'),
},
{
name: 'lambda',
project: createProject('src/lambda/tsconfig.json'),
},
// other projects
];
The tasks:
function buildPackage(tsPackage: IotSdkPackage) {
let releaseDir = dist;
return tsPackage.project
.src()
.pipe(tsPackage.project())
.pipe(dest(
${releaseDir}/${tsPackage.name}
));}
Include your gulpfile, or only the related task (with
ts.createProject
).tsconfig.json
Include your tsconfig, if related to this issue.
Code
Include your TypeScript code, if necessary.
The text was updated successfully, but these errors were encountered: