-
Notifications
You must be signed in to change notification settings - Fork 130
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
Version 2.11.0 transpiles incredibly slow. #282
Comments
It's hard to see why that's happening without more information. The only thing I could think of is the change related to
|
My {
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": true,
"noImplicitAny": false,
"module": "system",
"moduleResolution": "node",
"rootDir": "src",
"target": "es5"
}
, "exclude": [
"jspm_packages",
"node_modules",
"typings/main.d.ts",
"typings/main"
]
} My gulpfile var PATHSTS = {
src: 'src/**/*.ts'
}
var sourcemaps = require('gulp-sourcemaps')
var ts = require('gulp-typescript')
var tsProject = ts.createProject('tsconfig.json', { typescript: require('typescript') }); // links to 1.7.5
gulp.task('ts2js', function () {
return tsProject
.src()
.pipe(sourcemaps.init())
.pipe(ts(tsProject))
.js
.pipe(sourcemaps.write())
.pipe(gulp.dest('app'))
})
gulp.task('play', function () {
var fs = require('fs')
var http = require('http')
var connect = require('connect')
var serveStatic = require('serve-static')
var open = require('open')
var port = 9000, app
gulp.watch(PATHSTS.src, ['ts2js'])
app = connect().use(serveStatic(__dirname))
app.use(function (req, res) {
// redirect 404s to index.html
fs.readFile(__dirname + '/dist/index.html', function (err, data) {
if (err) {
res.writeHead(500)
return res.end('Error loading index.html')
}
res.writeHead(200)
res.end(data)
})
})
http.createServer(app).listen(port, function () {
open('http://localhost:' + port, 'Google Chrome')
})
}) and my directory structure
|
+1 My gulp configuration is pretty much the same and I also noticed speed worsening (in the latest version) and no difference when using gulp config
tsconfig.json
|
Hi, |
Found the reason of slow down. I have added bower package "material-design-icons": "~2.2.0" which is very huge 50MB and this caused performance issue. I haven't still found the way to resolve it because my bower and node packages are excluded in ts config and my task looks like this:
Can any one help? |
Could this be related to #275? |
Not sure because issue isn't the same. I don't have the problems with compiling it compiles OK with no dupes, so I can say it is not using files from ignored folders for building but seems like it still opens them or something like that? |
@ivogabe I just ran some more tests on my system, both versions use [email protected], configuration is identical, both output a mere 54 files.
they both access more (2.10) or less (2.11) these files:
they both do not access the |
I believe this is closely connected with #275. In the end, my ts compiles as expected, properly excluding all the right files/folders. BUT, I'll bet the Here's my super simple
And my gulp task:
|
I'm testing some things and I think I confirmed at least part of my hypothesis about
Console output:
The gulp-typescript/lib/project.ts Line 104 in 1d907f1
|
Thanks for the measurements everyone. I think I know what's going on. What happens when you replace |
Absolutely! Back to sub-second compile. |
+1 |
I might have some more pointers what the cause might be. Can someone post his list of dependencies, profile gulp using
|
Here is mine:
https://drive.google.com/folderview?id=0B5rL7ccxYIB7NnpOQ1BsNHc5bEU&usp=sharing |
Thanks everyone! I think I have fixed the issue. The problem was that Can everyone check whether this has fixed the issue? You can download gulp-typescript here from GitHub and place it into your |
Compiling my project increases from 7s (2.10.0) to 17s (2.11.0). In both version I don't see real speed increase using
ts.createProject
.The text was updated successfully, but these errors were encountered: