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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:02:45+00:00 2026-05-12T15:02:45+00:00

I need advice. I have application that imports 10,000 rows containing name & address

  • 0

I need advice. I have application that imports 10,000 rows containing name & address from a text file into XElements that are subsequently added to a synchronized queue. When the import is complete the app spawns worker threads that process the XElements by deenqueuing them, making a database call, inserting the database output into the request document and inserting the processed document into an output queue. When all requests have been processed the output queue is written to disk as an XML doc.

I used XElements for the requests because I needed the flexibility to add fields to the request during processing. i.e. Depending on the job type the app might require that it add phone number, date of birth or email address to a request based on a name/address match against a public record database.

My questions is; The XElements seems to use quite a bit of memory and I know there is a lot of parsing as the document makes its way through the processing methods. I’m considering replacing the XElements with a Dictionary object but I’m skeptical the gain will be worth the effort. In essence it will accomplish the same thing.

Thoughts?

  • 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-12T15:02:46+00:00Added an answer on May 12, 2026 at 3:02 pm

    So you’re not actually using any XML as such? You’re just using XElement as a collection of name/value pairs? If so, I’d definitely use a dictionary. I would expect your code to potentially come out cleaner as well.

    On the other hand if you’re genuinely using XML, you probably want to stick with XElement.

    Do you actually have a problem? You say it’s using up quite a bit of memory – do you have enough memory? Could you buy more memory? That would almost certainly be cheaper than spending even a few hours refactoring, if it’s just for the sake of saving memory. (It sounds like this app is only run on one box – I could be wrong. The more widely deployed it is, the more it probably makes sense to spend some time optimising it.)

    EDIT: Okay, so buying more memory isn’t really viable. Even so, do you actually have a problem? What’s the impact of this perhaps using more memory than it needs? What’s it really costing you?

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

Sidebar

Related Questions

I need advice on how to have my C# console application display text to
I need some expect advice on how to handle the following:- I have a
I need advice regarding subselect performance in MySQL. For a reason that I can't
I have to write an application that is essentially a proxy server to handle
I am working with GWT and have 4 Service Implementations that need a PersistenceManagerFactory.
I have an application that captures analog measurements several times a second - to
I have a old school c program that now and then need to tell
I have an application that I've developed in .NET 4.0/C#. It's designed to be
I have a very simple application and would need to have a menu screen
Im building my first application using CodeIgniter, i need a bit of advice. There

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.