Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7497529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:07:58+00:00 2026-05-29T19:07:58+00:00

Currently, our C#, .Net 3.5 win app does quite a bit of Console.WriteLine() to

  • 0

Currently, our C#, .Net 3.5 win app does quite a bit of Console.WriteLine() to keep ‘soft’ logs (not saved in files), which is both not entirely useful and probably a bit of a performance bottleneck, especially as its purpose is to do a bunch of calculations as quickly as possible.

I’ve just moved onto the team so I haven’t had time to profile an average running time, but it seems to me that it must be improvable by replacing the console output with something that is

  • optimised for speed
  • configurable at runtime, i.e. turnonandoffable

Configuration is great, but I have no idea if there would be any improvement, or degradation, in performance by switching to an equivalent amount of logging through a framework (Log4Net or other).

My gut tells me that having the same logging to the same output might be slightly slower in Log4Net as it’s essentially doing the same thing but having to go through another library. Is this correct or does it take some shortcuts to speed things up?

I would also think that skipping the console and writing directly to a log file would be faster (no buffer flushing, etc), as well as being saved for review/audit/posterity – so overall the best choice.

Does my thinking make sense – is this something I can confidently propose to the team lead? The only way I can reliably test this is to implement it, of course, but I was hoping I could back up my initial suggestion with others’ knowledge and experiences.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T19:07:59+00:00Added an answer on May 29, 2026 at 7:07 pm

    I hesit to answer, since you’ve given my answers yourself, but I’m starving for rep 🙂 …

    In my experience, Console logging is the slowest option of all. I often started with console logging and was always surprised how much faster the program run, when I turned it of. I think, that you won’t even notice the (small) overhead of some intermediate framework, when you’re logging to the console.

    I usually found it much faster to write to a file and use a dedicated log viewer software to watch it (sorry, I don’t have any software names at hand, but google should help you find a software).

    There’s also an option to use eg. OutputDebugString and a viewing utility (sorry, again, no name), if you want to watch your log during runtime.

    And of course saving logfiles for post-runtime-analysis is something, you might no longer miss after you started using it.

    The augmented configurability is of course a benefit, personally I do not make much use of it besides globally turning logging on and off (ok, sometimes, I use two or three different trace levels if I want some messages also appear in production code).

    So I think, your guts are right and I would suggest switching to some framework asap 🙂

    Just one remark:

    no buffer flushing, etc

    I would strongly suggest, not to disable buffer flushing. I flush my log buffers after every message. In case of a program crash, you won’t have any clues what went wrong, if you loose the last messages before the crash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

asp.net c# Our webpage currently contains a rather large web app which causes a
We currently have a FNH - MySQL 5.1 DAL in our .Net LOB app.
We're currently developing a full-text-search-enabled app and we Lucene.NET is our weapon of choice.
When reading our configuration and resource files, our .Net system currently just does ConfigurationManager.AppSettings[keyToFind]
We are currently migrating our app from VB6 to Net. As the Net forms
we are currently implementing logging functionality with Log4net into our ASP.NET web-services. Therefore we
Our product currently spans a large number of technologies, including Java, PL/SQL, VB.Net and
Are there any scheduling components, commercial or otherwise, for ASP.Net MVC? Our company currently
Our build plans for Sitecore (.Net) websites are currently using Bamboo as the build
We're currently rewriting our organizations ASP.NET MVC application which has been written twice already.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.