grunt build takes too long to complete - gruntjs

This is what my grunt build tasks execution time looks like. It suddenly increased to 3 hours from 10-20 minutes.
I can see ngtemplates:dist and uglify:generated taking the major chunk of execution time but 3 hours looks a little off for grunt build process. It's not even that huge an application but barely a skeleton application with limited features in it.
What could be the possible reasons and is it possible to reduce this?
Execution Time (2018-02-10 09:16:37 UTC-0)
loading tasks 421ms 0%
loading grunt-contrib-clean 4ms 0%
clean:dist 16ms 0%
loading grunt-wiredep 3ms 0%
wiredep:app 279ms 0%
wiredep:test 33ms 0%
loading grunt-usemin 47ms 0%
useminPrepare:html 31ms 0%
loading grunt-concurrent 11ms 0%
concurrent:dist 2.6s 0%
loading grunt-postcss 68ms 0%
postcss:server 120ms 0%
postcss:dist 20ms 0%
loading grunt-...lar-templates 10ms 0%
ngtemplates:dist 44m 6.1s ▇▇▇▇▇▇▇ 24%
loading grunt-contrib-concat 245ms 0%
concat:generated 1.9s 0%
loading grunt-ng-annotate 588ms 0%
ngAnnotate:dist 1m 2s ▇ 1%
loading grunt-contrib-copy 81ms 0%
copy:dist 204ms 0%
loading grunt-contrib-cssmin 849ms 0%
cssmin:generated 2m 12.5s ▇ 1%
loading grunt-contrib-uglify 2.2s 0%
uglify:generated 2h 19m 21.9s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 75%
loading grunt-filerev 154ms 0%
filerev:dist 286ms 0%
usemin:html 164ms 0%
usemin:css 81ms 0%
usemin:js 509ms 0%
loading grunt-contrib-htmlmin 119ms 0%
htmlmin:dist 207ms 0%
swPrecache:production 399ms 0%
ngconstant:production 154ms 0%
Total 3h 6m 54.4s

You might be processing more files than you needed? If it is going to take that long, consider these 2 points to speed up the process.
Consider using running multiple tasks concurrently.
https://www.npmjs.com/package/grunt-concurrent
Load all grunt plugins automatically (https://www.npmjs.com/package/load-grunt-tasks) by adding this at the top of the file.
require('load-grunt-tasks')(grunt);

Related

An experiment stays at 0% after 24 hours for a dataset of 13M rows

My running experiment seems hung, for it still stays at 0% after 24 hours, showing messages "Detecting schemas..." and "Waiting for information...". The dial setting was 8-5-5. The dataset size is about 8GB, 13M rows, 31 columns.
In the h2oai_experiment_name.log, I saw "max_rows = 151500000" and "max_rows_feature_evolution = 1520000". Where can I find the meaning of these ?
Would these have anything to do with the hang ? Would I have to edit config.toml or something like that to address the hang ?
I had to abort it and re-run the same training. It now worked. Maybe a glitch ? I don't know.

Mixin animation takes 1 argument but 2 were passed

I have the bellow sass code ,
#include animation(swayb $speed ease infinite 3s, reset 1s ease forwards 5s);
If i watch using compass watch from my ubuntu machine it will throws an error,
(Line 2500 of _includes/_common.scss: Mixin animation takes 1 argument
but 2 were passed.)
I hope it will work. Check below code :-
#include animation((swayb $speed ease infinite 3s, reset 1s ease forwards 5s));
reference - https://github.com/sass/sass/issues/699
and please check this article also
https://www.sitepoint.com/sass-multiple-arguments-lists-or-arglist/

How to monitor or print transfer state and speed for different percentage of SFTP file transfer with WinSCP?

I am running automating the process of SFTP, so I am running the commands
open sftp://username:passwordd#192.xxx.xxx.x/
# Change LOCAL directory
lcd "C:\Users\Desktop\"
# copy an individual file
put -nopermissions -preservetime "C:\Users\Desktop\xyz.webm" xyz.webm
and getting an output
C:\Users\Desktop\xyz.webm | 60734 KB | 3160.3 KB/s | binary | 100%
So while transferring this I want the output the same output for different percentages. Like would want to know the size, throughput for 20%, 40%, 60% and so on...
Here we are getting a consolidated output but would want output in steps.
Is there a way to do it or a command to get output in steps?
Thanks
You better use the WinSCP .NET assembly, instead of a plain scripting.
The assembly has Session.FileTransferProgress event.
Handle the event to monitor the FileTransferProgressEventArgs.FileProgress – when it exceeds one of your thresholds, read the state from the FileTransferProgressEventArgs.FileName, .FileProgress and .CPS.
See FileTransferProgressEventArgs class.

How to use wdiff with diff as input?

I am using wdiff to diff two files and I am trying to use the "-d --diff-input" option so I can stream in from a unified diff as the document. Imagine the following two text files:
one.txt: My hovercraft is full of eeels.
two.txt: My hovercraft is full of slippery eels.
(The -123 is to suppress diff output and the -s for stats.)
If I do wdiff -s123 one.txt two.txt I get:
one.txt: 6 words 5 83% common 0 0% deleted 1 17% changed
two.txt: 7 words 5 71% common 0 0% inserted 2 29% changed
This is what I'd expect. However, if I do: diff one.txt two.txt | wdiff -s123d I get:
(null): 17 words 16 94% common 1 6% deleted 0 0% changed
(null): 16 words 16 100% common 0 0% inserted 0 0% changed
From what I can tell of the docs and googling, this is the intended use case and they should return the same output, but obviously not. Anyone know what I am missing?
EDIT: I am using wdiff 1.1.2 on mint/ubuntu.
EDIT:
I missed the word "unified" in the man page. It is looking for the "-u" option, so I should be specifying diff -u one.txt two.txt | wdiff -s123d. I get better results, but unfortunately unified diff still has a two line header which gets diff'd.
(null): 15 words 11 73% common 0 0% deleted 4 27% changed
(null): 16 words 11 69% common 0 0% inserted 5 31% changed
So now the problem is how to get diff to not emit the header lines. Again I have googled and experimented with no results. If course I could write a little script to rip off the three lines before wdiff, hopefully it will still parse.
On a side note, because it used the unified diff output, it should work with git diff output a well.

LESS mixin - Output values without quotes

I am trying to write a LESS mixin with multiple input parameter values for CSS transforms. The input values are the type of transformation to be done and the value associated with the transformation.
For example, consider the code given below:
.transform(#type; #value){
}
If I give input as type='rotateY' and value='360deg', the output should be transform: rotateY(360deg). I have tried the below options but none of them seem to be working (output is mentioned as comment).
transform: "#{type}(#{value})"; /* Output: "rotateY(360deg)" */
transform: #{type}(#{value}); /* Output: Compiler error */
transform: #type(#value); /* Output: rotateY 360deg */
How should I code it to get the output as required? Please help.
Note: The mixin code has a lot of other items also, I have posted just the line that needs fixing.
Just escape the string using ~ like shown below. Doing this would make sure that the quotes are not printed in the output CSS.
Input Code:
transform: ~"#{type}(#{value})";
or
transform: e("#{type}(#{value})");
Mixin Call:
.transform(rotateY;360deg);
Output CSS:
transform: rotateY(360deg);

Resources