In a sharePoint application we can retrieve resource file data from two methods.
1. ResourceManager.GetString(): Which is the API provided by .Net.
2.SPUtility.GetLocalizedString():This method is provided by the sharePoint API in Microsoft.SharePoint.Utilities.
To test the performance of these two methods-
1. First we created a visual web part and put two labels in it.
2.Then we fetched 1,000 strings from same resource file using both methods and found that SPUtility.GetLocalizedString() method is five times faster than ResourceManager.GetString() method.
After de-compiling the assemblies, i found one interesting thing that SPUtility.GetLocalizedString() method cached the whole resource file and each time when we have query via SPUtility.GetLocalizedString() method , it will return localized data from cache.
Subscribe to:
Post Comments
(
Atom
)
Do you know why i like this website? I like this website because of great and update info. I also like Sharing-and-Visibility-Designer braindumps because now they are writing quality content for the student. I am very proud for that.
ReplyDelete