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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:48:16+00:00 2026-06-07T00:48:16+00:00

Win 7/SolrNet 0.4.0/C# winforms .net 4.0 client. I am using Solrnet and a winforms

  • 0

Win 7/SolrNet 0.4.0/C# winforms .net 4.0 client.

I am using Solrnet and a winforms threaded application to write multiple Bitmaps and some mathematical descriptors to a Solr instance (on a different server). The interesting thing is solr.Add method seems to slow down the app significantly. i.e. if I comment out the add & commit methods, the CPU utilization jumps to 90% or so, but with them working, CPU utilization is about 20% – however appears the docs are being written to Solr.

Is that expected behavior? would the Solr writes be the bottleneck? How can I get around that?

            var doc = new IndexDocument
            {
                _UUID = Guid.NewGuid().ToString(),
                _FileName = (FileName),
             };

            //// Bitmap is not thread safe we Need to make a copy for each Task and done so synchronously.            
            Bitmap[] blobCopies = MakeBlobCopies(bmpBlob, 2);

            Task<List<KeyValuePair<string, double>>>[] descriptorTasks = new Task<List<KeyValuePair<string, double>>>[2];
            descriptorTasks[0] = Task.Factory.StartNew<List<KeyValuePair<string, double>>>(() => ApplyDescriptor1(blobCopies[0]));
            descriptorTasks[1] = Task.Factory.StartNew<List<KeyValuePair<string, double>>>(() => ApplyDescriptor2(blobCopies[1]));

            Task.WaitAll(descriptorTasks);
            foreach (var t in descriptorTasks)
            {
                List<KeyValuePair<string, double>> flds = t.Result;
                foreach (KeyValuePair<string, double> fld in flds)
                {
                    Type type = doc.GetType();
                    if (!String.IsNullOrEmpty(fld.Key))
                    {
                        SetPropertyValue(doc, fld.Key, fld.Value);
                    }
                }
            }

            DisposeBlobCopies(blobCopies);

            solr.Add(doc);
            solr.Commit();
  • 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-06-07T00:48:18+00:00Added an answer on June 7, 2026 at 12:48 am

    The solr calls could be the bottleneck in your app as they are blocking io hits. Add and commit are 2 distinct calls to a restful api. I’m almost positive that solrnet does not have native support in their api to do async calls, but it looks like you know how to use the task parallel library. Make the calls non blocking and things should speed up. You may find it necessary to control the amount of concurrency.

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

Sidebar

Related Questions

Running multi-core Solr under Tomcat 6.0 /Win 2008 Server and ASP.NET queries via SolrNet.
I am working on win application using c#, I want to send Ctrl +
In my VB.net win form application, when I clicked Load button I am displaying
I am on win 7 and trying to install a .NET windows service using
In a .NET Win console application, I would like to access an App.config file
I am migrating some win forms panels to WPF. In WinForms, you can tab
In a C# based Win forms application I am working on a report using
I am doing an win form application. I am using a tree view and
I developed a win forms app targeting .net 2.0. All of this is in
I'm developing a win forms, continious 24/7 video player and I need some help

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.