We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Rendering Slow

Dear Team,

Document Editor control rendering slow in angular 15 with your patch 20.4.40.

I found in your below code inside ngAfterViewInit settimeout function getting delay the rendering. Because I have comment the settimeout and after it is rendering fast. 

  ComponentBase.prototype.ngAfterViewInit = function (isTempRef) {
        // tslint:disable-next-line:no-any
        var tempAfterViewThis = isTempRef || this;
        var regExp = /ejs-tab|ejs-accordion/g;
        /* istanbul ignore next */
        if (regExp.test(tempAfterViewThis.ngEle.nativeElement.outerHTML)) {
            tempAfterViewThis.ngEle.nativeElement.style.visibility = 'hidden';
        }
        /**
         * Root level template properties are not getting rendered,
         * Due to ngonchanges not get triggered.
         * so that we have set template value for root level template properties,
         * for example: refer below syntax
         * ```html
         * <ejs-grid>
         * <e-column></e-column>
         * <ng-template #editSettingsTemplate></ng-template>
         * </ejs-grid>
         * ```
         */
        var templateProperties = Object.keys(tempAfterViewThis);
        templateProperties = templateProperties.filter(function (val) {
            return /Ref$/i.test(val);
        });
        for (var _i = 0, templateProperties_1 = templateProperties; _i < templateProperties_1.length; _i++) {
            var tempName = templateProperties_1[_i];
            var propName = tempName.replace('Ref', '');
            setValue(propName.replace('_', '.'), getValue(propName + 'Ref', tempAfterViewThis), tempAfterViewThis);
        }
        // Used setTimeout for template binding
        // Refer Link: https://github.com/angular/angular/issues/6005
        setTimeout(function () {
            /* istanbul ignore else  */
            if (typeof window !== 'undefined' && tempAfterViewThis.element || tempAfterViewThis.getModuleName().includes('btn')) {
                tempAfterViewThis.appendTo(tempAfterViewThis.element);
                tempAfterViewThis.ngEle.nativeElement.style.visibility = '';
            }
        });
    };

So, please give me solution as soon as possible

Regards
Nagendra Gupta



8 Replies

DS Dhanush Sekar Syncfusion Team February 6, 2023 07:37 AM UTC

Hi Nagendra,


We understand that in Angular CLI, the template directive can take time to compile and return the value to the component view. To avoid this problem, the tempAfterViewThis.appendTo(tempAfterViewThis.element) method is wrapped inside the setTimeout function, which allows the templates enough time to render and update the component view. This is done because the setTimeout function creates a delay, giving the templates enough time to be compiled before the directive returns its value. This is the default behavior for our component architecture for template binding.

Reference: https://github.com/angular/angular/issues/6005#issuecomment-177231549


Regards,

Dhanush Sekar



NG Nagendra Gupta February 7, 2023 02:02 PM UTC

Dear Dhanush Sekar

I understand your point for default behavior for our component architecture for template binding . But I am really suffering from this delay.

Please suggest me what can I do for this delay which I have shared in video ?.

Please find the attach video.



Attachment: delay_251f02e0.zip



TJ Theveshwar Jayakumar Syncfusion Team February 8, 2023 05:32 PM UTC

Hi Nagendra,


We understand that you are facing issue with our Syncfusion controls, but we need some additional time to validate on this reported scenario, so we will update further details on or before February 10, 2023.

Until then we appreciate your patience 

Regards,

Theveshwar



TJ Theveshwar Jayakumar Syncfusion Team March 2, 2023 05:36 AM UTC

Hi Nagendra ,

 

We deeply regret for the delay caused,
 

We have evaluated the reported issue and confirmed the scenario as a bug from our end. Also, we have planned to fix this issue in our upcoming patch release, which is scheduled to be rolled out in the middle of March . You can track the status of this issue in the below feedback link.

 

Feedback Link: Need to resolve document editor rendering delay in Angular | Feedback Portal (syncfusion.com)

 

Please get back to us if you have any concerns.

 

Regards,

Theveshwar



NG Nagendra Gupta replied to Theveshwar Jayakumar March 18, 2023 07:34 AM UTC

Dear Theveshwar Jayakumar,

March middle already passed but till now I have not got the solution from your side. I am very upset because of your not giving solution on time. You tell me what should we do so that we can get the solution.


Regards

Nagendra Gupta




NG Nagendra Gupta replied to Nagendra Gupta March 23, 2023 05:57 AM UTC

Dear Theveshwar Jayakumar,

I am waiting for your reply with solution.


Regards

Nagendra Gupta




TJ Theveshwar Jayakumar Syncfusion Team March 24, 2023 08:55 AM UTC

Hi Nagendra,

 

We deeply regret for the inconvenience caused.

 

We could not include the fix for the issue "Rendering Slow" with our 2023 Volume 1 release due to high complexities. However, we have prioritized this fix, and planned to include in our second patch of 2023 Volume 1 release which is scheduled to be rolled out in the first week of April, we assure you the fix will be delivered without any further delay. You can tract the status in the below feedback link.

 

Feedback Link: Need to resolve document editor rendering delay in Angular | Feedback Portal (syncfusion.com)

 

Until we appreciate your patience

 

Regards,

Theveshwar



TJ Theveshwar Jayakumar Syncfusion Team April 6, 2023 05:14 AM UTC

Hi Nagendra,

 

Thanks for the patience,

 

We have resolved the issue "Rendering Slow" in our latest patch release version (v20.1.38). So, to resolve this issue kindly update our packages to the latest mentioned patch release version.

Please refer the release notes attached below.


Release Notes: https://ej2.syncfusion.com/angular/documentation/release-notes/21.1.38/?type=all#common

 

Please get back to us if you have any concerns.

 

Regards,

Theveshwar


Loader.
Live Chat Icon For mobile
Up arrow icon