pkaminski / digest-hud Goto Github PK
View Code? Open in Web Editor NEWDigest performance analysis HUD for AngularJS.
License: MIT License
Digest performance analysis HUD for AngularJS.
License: MIT License
I have binded a simple variable to a text box and its also displayed using expression. My expression is {{Data}} , its not seen your report below. I see it in Batarang. Second what is function () { var start = perf.now();
Total Watch Work Overhead Function
83.3% (38.9% + 11.1% + 33.3%) function () { var start = perf.now(); var ret = watchExpression.apply(this, arguments); var end = perf.now(); _digestEvents.push({ eventType: 'scope:watch', id: scopeId, watch: watchStr, time: end - start }); return ret; }
16.7% ( 0.0% + 0.0% + 16.7%) $$ng-overhead
0.0% ( 0.0% + 0.0% + 0.0%) $evalAsync(function (){e.$$inter||!c.hasOwnProperty(a)||x(c[a])||b(c[a])})
Top 3 items account for 100.0% of 18ms of digest processing time.
Will be nice to remove the jQuery dependency
I've setup everything and it works fine.
What do I do from here?
Maybe do a quick screen cap vid showing how you improve the performance of a n app?
I'll gladly help / do the vid myself if you give me some pointers
Would it be too difficult to give the container div a class so we can style it? I know this isn't exactly intended for production (and I won't use it for that), but it would be useful.
Hello,
I am trying to understand the report.
I have a simple text box and binded with expression. Ng-overhead and $evalasyc is not applicable for me.
But i see the {{Data}} and some function(var b blah ) coming in. Is that function var for the textbox when i start typing in
Total Watch Work Overhead Function
80.0% (60.0% + 0.0% + 20.0%) function (){var b=r(a);if(b!==p.$modelValue&&(p.$modelValue===p.$modelValue||b===b)){p.$modelValue=p.$$rawModelValue=b;t=u;for(var c=p.$formatters,d=c.length,e=b;d--;)e=cd;p.$viewValue!==e&&(p.$$updateEmptyClasses(e),p.$viewValue=p.$$lastCommittedViewValue=e,p.$render(),p.$$runValidators(b,e,w))}return b}
20.0% ( 0.0% + 0.0% + 20.0%) {{Data}}
Would be great if this module didn't rely on underscore.js. There's just a handful of methods used so it shouldn't be too hard of a refactor. I'll try to make the change if time permits.
Would it be possible to shift the actual enabling later on in the application cycle? The performance/stats enabling is usually decided upon initialization, driven by some values, etc. etc. If possible, I would prefer to be able to enable it later, from controller or component (in my own "if" block). In the config section I don't have yet access/data to be able to determine if I want to enable it or not. Adding and removing code doesn't sound like a good idea.
I have detected problems during digest-hud watching expressions when the app uses filters in template, for example: if you have in template:
data-title="'library.nav.allGenres' | i18next"
and if you have enabled digest-hud, the app catch filter error like:
Error: [$injector:unpr] Unknown provider: i18nextFilterProvider <- i18nextFilter
http://errors.angularjs.org/1.3.17/$injector/unpr?p0=i18nextFilterProvider%20%3C-NaN18nextFilter
at REGEX_STRING_REGEXP (http://localhost:8000/libs/bower-components/angular/angular.js:63:12)
at http://localhost:8000/libs/bower-components/angular/angular.js:4031:19
at Object.getService as get
at http://localhost:8000/libs/bower-components/angular/angular.js:4036:45
at Object.getService as get
at $get as $filter
at Parser.filter (http://localhost:8000/libs/bower-components/angular/angular.js:12242:19)
at Parser.filterChain (http://localhost:8000/libs/bower-components/angular/angular.js:12236:19)
at Parser.statements (http://localhost:8000/libs/bower-components/angular/angular.js:12215:30)
at Parser.parse (http://localhost:8000/libs/bower-components/angular/angular.js:12072:22)(anonymous function) @ angular.js:11707$get @ angular.js:8628invokeLinkFn @ angular.js:8292nodeLinkFn @ angular.js:7800compositeLinkFn @ angular.js:7149publicLinkFn @ angular.js:7028$get.boundTranscludeFn @ angular.js:7167controllersBoundTransclude @ angular.js:7827ngIfWatchAction @ angular.js:22205instrumentedListener @ digest-hud.js:405$get.Scope.$digest @ angular.js:14397instrumentedDigest @ digest-hud.js:208$digest @ inspector.js:112$get.Scope.$apply @ angular.js:14660done @ angular.js:9734callbackDecorator @ uniapi.js:7058completeRequest @ angular.js:9924requestLoaded @ angular.js:9865
I think when $parse changes watchExpression, maybe there is a problem, i'm debugging it and i will have more details soon.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.