Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Closed Issue: HTML Editor Init performance - save 3 seconds! [26791]

$
0
0
When HTMLEditor is created AjaxControlToolkit.HTMLEditor.ToolbarButton.CommonButton.OnInit (EventArgs) is called 56 times. Each call creates a new instance ResoureManager and reads a single string.
When I did a static field _rm and tested on OnInit if not null, I save 2999ms.


private static ResourceManager _rm;

protected override void OnInit(EventArgs e)
{
if (_rm == null)
_rm = new ResourceManager("ScriptResources.BaseScriptsResources", Assembly.GetExecutingAssembly());
ToolTip = _rm.GetString("HTMLEditor_toolbar_button_" + this.GetType().Name + "_title");
base.OnInit(e);
}
Comments: Outdated.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>