简体   繁体   中英

Measure Angular Partial Rendering Performance

Is it possible to somehow measure a http call to render a partial?

In my application, even though the partial is always present, the call to render it sometimes fails or takes a lot longer than usual, despite the fact that nothing has changed.

Is there a way to measure the call to render so it can somehow be optimised or improved?

If you are using ui-router you will have $viewContentLoaded event. This event triggered for every view that done loading at current page. So measuring will be between resolve or Controller constructor function and $viewContentLoaded event.

When I was faced such problem I replaced a lot of ng-view with ng-include and that solved my problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM