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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:55:32+00:00 2026-05-11T10:55:32+00:00

I wonder if anyone else has asked a similar question. Basically, I have a

  • 0

I wonder if anyone else has asked a similar question.

Basically, I have a huge tree I’m building up in RAM using LINQ objects, and then I dump it all in one go using DataContext.SubmitChanges().

It works, but I can’t find how to give the user a sort of visual indication of how far has the query progressed so far. If I could ultimately implement a sort of progress bar, that would be great, even if there is a minimal loss in performance.

Note that I have quite a large amount of rows to put into the DB, over 750,000 rows. I haven’t timed it exactly, but it does take a long while to put them in.

Edit: I thought I’d better give some indication of what I’m doing.

Basically, I’m building a suffix tree from the Lord of the Rings. Thus, there are a lot of Nodes, and certain Nodes have positions associated to them (Nodes that happen to be at the end of a suffix). I am building the Linq objects along these lines.

suffixTreeDB.NodeObjs.InsertOnSubmit(new NodeObj() {     NodeID = 0,     ParentID = 0,     Path = '$' }); 

After the suffix tree has been fully generated in RAM (which only takes a few seconds), I then call suffixTreeDB.submitChanges();

What I’m wondering is if there is any faster way of doing this. Thanks!

Edit 2: I’ve did a stopwatch, and apparently it takes precisely 6 minutes for the DB to be written.

  • 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. 2026-05-11T10:55:32+00:00Added an answer on May 11, 2026 at 10:55 am

    I suggest you divide the calls you are doing, as they are sent in separate calls to the db anyway. This will also reduce the size of the transaction (which linq does when calling submitchanges).

    If you divide them in 10 blocks of 75.000, you can provide a rough estimate on a 1/10 scale.

    Update 1: After re-reading your post and your new comments, I think you should take a look at SqlBulkCopy instead. If you need to improve the time of the operation, that’s the way to go. Check this related question/answer: What's the fastest way to bulk insert a lot of data in SQL Server (C# client)

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

Sidebar

Related Questions

I wonder if anyone could please help me I have been using HTML tidy
I wonder if anyone knows the flag for gcc to disable tailcall optimizations. Basically
Hi I wonder if anyone could give me an example how the TickGetDiv256(); function
Having a bit of config trouble in Wordpress and wonder if anyone can help.
We have customers asking for apps that can run on both iPhone and Android.
I'm trying to buid a site with the following: VS 2010 (for the updated
*I was wondering if i could do all these in javascript, as opposed to
I've been looking at the problem of writing a concurrent Multimap , and I
I'm writing an application. I want various parts of it to be accessible via
I'm getting this error (see title) while trying to parse an XML file in

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.