c# - Performance issues with the existing coding approach using global :: keyword -


i have been asked refactor particular module in application , tweak

performance related issues (if any).

coming module,there portions needs strings

displayed. strings supplied language assembly(.dll)

referred in project, returns string xml file containing

strings if pass keyword.

for ex:

language.getstringfromid("txt_warning"); return warning !!

the original developer has generously used

global :: language.getinstance().getstringfromid("keyword") whenever fetch string

question 1, approach ??

i had second thoughts approach, ran performance profiler , see

everytime when string requested, takes 500ms return string

queried keyword.

before conclude indeed culprit, need thoughts .net experts

in stackoverflow

question 2

is there performance hit if use global :: in general ??

cheers

  1. it should used eliminate namespace conflicts.
  2. no performance hit using global::. it's handled compiler. theres nothing namespaces @ runtime.

the performance hit inside language.getstringfromid


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -