question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Loading maps causes increasing time of task when running multiple times through watch

See original GitHub issue

I have a rather large project with TypeScript which included a gulp.watch task to monitor for change in the TypeScript source files and trigger the build task accordingly.

Recently (but I cannot point exactly) it started to need more time from compilation to compilation, starting with approx. 12s, then, 18s, 27s, 33s, 38s, and so on. Canceling the running gulp instance and restarting it on the command line restarts the compilation times.

When I turn off loading of sourcemaps (sourcemaps.init({loadMaps:false})), this does not happen and compile times stay the same.

It tried to reproduce it with a small sample project but without luck. I profiled it with the Chrome debugger for NodeJS and can say that somewhere in debug.js/selectColor the times increase because the parameter namespace gets longer and longer on each iteration which affects the calculation of the hash.

For now I can work with the deactivated loading of sourcemaps. But can someone give any hint on what is happening? And I would also appreciate a more detailed explanation of what loading the sourcemaps does as I primarly did it because the Aurelia template did it.

Versions: Node 8.1.2 and 6.5 tested Gulp 3.91 and 4-alpha tested Gulp-Sourcemaps 2.6.0 Gulp-TypeScript 3.1.6 TypeScript 2.3.4 Windows 10

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:22 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
nmccreadycommented, Aug 18, 2017

Rebuilt and it went away.

3reactions
jybleaucommented, Jul 12, 2017

Hello @nmccready , your branch works for me. Consistent execution time during watch task with loadMaps = true. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tasks and the back stack | Android Developers
If the user continues to press or gesture Back, then each activity in the stack is popped off to reveal the previous one,...
Read more >
Analyze runtime performance - Chrome Developers
Runtime performance is how your page performs when it is running, as opposed to loading. This tutorial teaches you how to use the...
Read more >
Response Time Limits: Article by Jakob Nielsen
How users react to delays in a user interface, whether website or application. The 3 main response time limits are determined by human...
Read more >
Context switching: Why jumping between tasks is killing your ...
Context switching – when you jump between tasks, tools, or projects–has a huge impact on your productivity, focus, and happiness.
Read more >
10 Strategies for Better Time Management - UGA Extension
Record what you are doing in 15-minute intervals for a week or two. ... Task Managers – Prioritize and organize tasks to improve...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found