Skip to content
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

why uglify runing so slow? #474

Closed
grassmu opened this issue Apr 24, 2014 · 0 comments
Closed

why uglify runing so slow? #474

grassmu opened this issue Apr 24, 2014 · 0 comments

Comments

@grassmu
Copy link

grassmu commented Apr 24, 2014

fileUtil.readFile(file, "utf-8", function(err,data) {
if(err) {
console.log("reading file "+ path.resolve(file)+" error");
return;
}
var fileName = path.basename(file, ".js");
console.log("fuck")
var result = uglify.minify(data, {
outSourceMap: fileName + ".map",
fromString: true
});
fileUtil.writeFile(file, result.code, "utf-8", function () {
console.log("file " + file + " created");
fs.rename(file, path.dirname(file)+""+fileName+"_"+util.md5(data, 7) + ".js", function() {});
});
fileUtil.writeFile(path.dirname(file)+""+fileName+ ".map", result.map, "utf-8", function () {
console.log("file " + path.dirname(file)+""+fileName+ ".map created")
});
})

when I run this code, the console diaplay logs very very slow!!!!
when I remove minify code , it runs fast?
please tell me why?
how can i modify it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants