How do I find/locate performance problems? I have something weird in my script were resizing the window causes performance problems. The resize code itself is not the problem. Is there an easy way in the new debugger to locate performance bottlenecks like in Visual Studio? Some kind of profiler?
I bet there is a loop somewhere that has problems breaking out. But which one...
Chrome does come with a JS profiler that you can run to see what function calls take up the most time per frame, but since it shows you information on every frame, it's quite a lot to sort through. But, it should how you easily find which calls are longer than they should be.
Thanks.
And without a browser? Because my script isn't even compatible with browsers it seems.
Because Javascript is not the same for a desktop PC as it is for browsers or mobile phones. It's not 100% crossplatform, maybe 98% but not 100%. I found that out the hard way. Like this code:
function fileExists(filename){ var fullPath = this.FolderPath() + filename; var fs = require('fs'); // <<< browsers should crash here. At least FireFox does for me. Doesn't know the require-command. return fs.existsSync(fullPath);}Although I think FireFox does know the require command. It probably doesn't know or blocks the 'fs' filesystem package.