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 7439371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:41:47+00:00 2026-05-29T10:41:47+00:00

I have a .net winform c# program. I collect traces on my program, with

  • 0

I have a .net winform c# program.
I collect traces on my program, with my own trace system. The trace show information about what the user did and other usefull information.
I store each trace in a dataset. An example, I add a row in the dataset every second.
The programe dispose the traces only when the program encounter a undhandler exception or when the program close.

The problem is : The dataset begin to be very large in the memory, and if the program is running enough time, a out of memory exception occur.

I search the web and i found some ideas.
– put the dataset in a file on hard drive ( in this case I must open a big file each time i want to add a trace)
– paging the dataset

I must find a way to free the memory use by this dataset by keeping all the information it containts and also keep a way to add additionnal rows to this dataset.

Someone have ideas or guidance ? Thank you

  • 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-29T10:41:47+00:00Added an answer on May 29, 2026 at 10:41 am

    You could save the content of the dataset to disk (every hour in its own file), clear the in-memory data, run for an hour in-memory, save the data into a separate file and so on.

    This way your memory consumption should be ok and your performance gets only hit once an hour.

    Since the files on disk all have the same structure they can be merged whenever you need the “complete data”.

    Although I would recommend using some existing logging library – there are lots of well-tested one out there (free and commercial).

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

Sidebar

Related Questions

I have some custom user controls in my .net winforms program that do not
I have a Winform application built with C# and .Net 2.0. I have a
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
In VB.NET, I have a Combobox on a WinForm form. The form allows the
This is my first winform app in .NET... I have made a couple of
I have a .net WinForms 2.0 application that has an image library of about
I have several WinForms .NET programs that are started using ClickOnce. The user logs
I have a project where a user for the company will use a winform
We have a C#/.NET 2.0 WinForm with an ActiveX ShockwaveFlashObject control on it. The
I have created a VB.NET program using windows forms. The program runs on a

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.