is log4net many slower system.diagnostics.trace?


i'm questioning differences between controlling log4net system.diagnostics.trace logging, i'm extraordinary opening differences i've observed.



i combined exam concentration review opening both logging methods several scenarios, i'm awaiting log4net significantly slower trace class. example, unfolding where i record 1,000 messages twine formatting, log4net's meant execution over 1,000 trials 9.00ms. trace executes meant 1.13ms. lot exam cases have comparatively infinite volume opposing log4net execution times; periodic inlet outlier enlarged executions seems advise gc interference. poking around clr profiler confirms there infinite volume collections ton log4net.core.loggingevent objects generated (to fair, looks trace generates ton char[] objects well, nonetheless doesn't arrangement infinite opposing log4net does.)



one thing i'm retaining mind here even nonetheless log4net seems roughly 9 times slower trace, inadequacy 8ms over 1,000 iterations; isn't accurately touching opening drain. still, approaching cases competence job methods logging things hundreds thousands times, numbers quick machine. slower accessory some-more customary the users' configurations inadequacy 170ms 11ms little bit some-more alarming.



is opening customary log4net, there gotchas significantly boost log4net's performance?



(note: i am wakeful twine formatting change execution time; i am perplexing review apples apples i have exam cases formatting exam cases formatting; log4net stays proportionally delayed presumably twine formatting used not.)



the story far:




  • robert gould best answer question; i especially extraordinary customary log4net perform many slower trace class.

  • alex shnayder's answer engaging information nonetheless doesn't unequivocally tumble underneath range question. half vigilant introducing logging support debugging both judicious opening problems live systems; the business put the products outlandish scenarios mostly challenging imitate but costly large-scale hardware configurations. sure pleasantness infinite timing inadequacy between "not logging" "logging" impact component such proceed bugs don't happen. end, scale opening diminution infinite nonetheless bulk small, i'm anticipating won't problem.



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members