Base solution for your next web application
Open Closed

About Performance #4343


User avatar
0
simedbn created

Hello,

I need to show profile pictures in the datatable , is that gonna not impact the performance because i will get pictures of the 10 first users or more?

In the create-or-edit-user-modal component :

this._userService.getUserForEdit(userId).subscribe(userResult => {
            this.user = userResult.user;
            this.roles = userResult.roles;
            this.canChangeUserName = this.user.userName !== AppConsts.userManagement.defaultAdminUserName;

            this.allOrganizationUnits = userResult.allOrganizationUnits;
            this.memberedOrganizationUnits = userResult.memberedOrganizationUnits;

          **this.getProfilePicture(userResult.profilePictureId);**

Why make another call to the webapi to get the profilePicture why not do it in the getUserForEdit method ? is related to performance ?

Thank you. simed


1 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    hi, if you consider performance issues, you can create a custom method which combines all your business.