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

  • SEARCH
  • Home
  • 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 7054415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:37:26+00:00 2026-05-28T03:37:26+00:00

Before refactoring my code to start experimenting, I’m hoping the wisdom of the community

  • 0

Before refactoring my code to start experimenting, I’m hoping the wisdom of the community can advise me on the correct path.

Problem: I have a WPF program that does a diff on hundreds of ini files. For performance of the diffing I’d like to keep several hundred of the base files that other files are diffed against in memory. I’ve found using custom classes to store this data starts to bring my GUI to a halt once I’ve loaded 10-15 files with approximately 4000 line of data each.

I’m considering several strategies to improve performance:

  • Don’t store more than a few files in memory at a time and forget about what I hoped would have been perf improvement in parsing by keeping them in memory
  • Experiment with running all the base file data in a BackgroundWorker thread. I’m not doing any work of these files on the GUI thread but maybe all that stored data is affecting it somehow. I’m guessing here.
  • Experiment with System.Runtime.Caching class.

The question asked here on SO didn’t, in my mind, answer the question of what’s the best strategy for this type of work. Thanks in advance for any help you can provide!

  • 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-28T03:37:27+00:00Added an answer on May 28, 2026 at 3:37 am

    Assuming 100 character lines of text 15 * 4000 * 100 is only 6MB which is a trivial amount of memory on a modern PC. If your GUI is coming to a halt then to me that is an indication of virtual memory being swapped in and out to disk. That doesn’t make sense for only 6MB so I’d figure out how much it’s really taking up and why. If may well be some trivial mistake that would be easier to fix than re-thinking your whole strategy. The other possibility is that it has nothing to do with memory consumption but rather an algorithm issue.

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

Sidebar

Related Questions

(Before I start, yes I have asked a similar question before; unfortunately due to
Before I start, I want to make it clear that my code is working
So here is the scenario, I am refactoring some spaghetti code. My first problem
How much information hiding is necessary? I have boilerplate code before I delete a
Recently I have been refactoring some of my C# code and I found a
I have made a major refactoring of some code, and in the process I
before I start I want to point out that I tagged this question as
Before asking my question, let me explain the context. CONTEXT: I have a web
Before saying anything I have to say that, albeit I'm an experienced programmer in
Before I ask the question let me state that I have attempted to google

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.