This is a migrated thread and some comments may be shown as answers.

Performance when Editor is not enabled

1 Answer 41 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 2
Ed asked on 28 Jul 2010, 04:20 PM
Hi All,

I did search for related posts to this but couldn't find anything that seemed similar.

We have written a content management system using RadEditors that enables administrators to edit the content of various sections of their website. In basic terms, if the user is authenticated and authorised they see the full editor and can change the content sections. If they are not authenticated or not authorised they just see the text (not the editor). In the case where they don't have permission we set the Enabled property of the editor to False.

We are using version 2010.1.309.20 and I have yet to try this with the latest version.

We have noticed that when the editor is not Enabled there still appears to be quite a performance hit in the PreRender even though we would have thought that a lot of the processing should not be required as it just needs to display the content and not load any of the editing scripts. This is causing us problems on pages with lots of editors - as every user has the performance hit and not just the admins who are editing the content.

We tried a few examples using different combination of settings on the editor: Enabled=True/False and Visible=True/False.

Below is what we found by using Trace:

                                                               Category           Message                         From First(s)                    From Last(s)

(.Enabled = False     .Visible = False)    aspx.page           End PreRender                 0.113901169180098         0.000381

(.Enabled = False     .Visible = True)     aspx.page           End PreRender                 0.493980624395962         0.079942

(.Enabled = True      .Visible = True)     aspx.page           End PreRender                 0.300766392569965         0.125472


You can see that if the editor is Visible and Editable there is a bit of overhead but this is expected as there is a lot of functionality to load.
But if we set Enabled to False, then there is still quite a hit.
If the editor is not Visible then the hit is minimal.

So we thought about setting the Visible property to False just before the editor's PreRender is fired, and then set it to True straight afterwards. This worked, the non-editable content was displayed on the webpage as normal and the performance hit was minimal.

Is this something that has been addressed in a later version or if not can anything be done so that there is not such a bit hit when the editor is not Enabled.

Many thanks,
Andy




1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 30 Jul 2010, 04:01 PM
Hi Andy,

There are not any performance changes between version 2010.1.309 and the latest one 2010.2 713 in regards to the reported scenario.

It looks like a one time problem and I think that if you refresh the page the loading time should be decreased after the initial page load. The increased loading time could be due to another control or element on the page with RadEditor, because RadEditor renders the content when disabled in a standard DIV element.

In addition, if your workaround, about setting the Visible property to False just before the editor's PreRender is fired, and then set it to True straight afterwards, works as expected then my suggestion is to use it.

Kind regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Ed
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Share this question
or