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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:03:07+00:00 2026-05-11T12:03:07+00:00

Let me describe the problem and the solution i currently have and maybe you

  • 0

Let me describe the problem and the solution i currently have and maybe you can help enlighten me on why it’s a bad idea (assuming it is) and what i can do to make it a better system.

right now i have 600 ‘rippers’ that parse files and rip them to csv or other formats. the rippers all implement a common interface and base class. At the moment when a job is queued up depending on the configuration of that job a specific ripper is called using reflection.

            foreach (var stream in streams)             {                 try                 {                     // load it                     Assembly asm = Assembly.LoadFile(Path.Combine(stream.RipperPath, stream.RipperFileName), new Evidence());                     if (asm == null)                     {                         MessageBox.Show(String.Format('Invalid Interface ripper loaded.\n{0}', Path.Combine(stream.RipperPath, stream.RipperFileName)));                         return;                     }                      foreach (Type objType in asm.GetTypes())                     {                         if (!objType.IsPublic)                             continue;                          // make sure the type isn't Abstract                         if (((objType.Attributes & TypeAttributes.Abstract) == TypeAttributes.Abstract))                             continue;                          // IRipper is the interface that all of the Rippers must implement to be loaded                         Type objInterface = objType.GetInterface('IRipper', true);                         if (objInterface == null)                             continue;                          try                         {                             var iri = (IRipper)Activator.CreateInstance(objType);                              // Rippers must register with their hosts                             iri.Host = this;                             iri.OnStart += RipperStart;                             iri.OnComplete += RipperComplete;                             iri.OnProgressChanged += RipperStatusUpdate;                             iri.dataStream = stream;                         }                         catch (Exception ex)                         {                             Console.WriteLine(ex.Message);                         }                     }                 }                 catch (Exception ex)                 {                     MessageBox.Show(String.Format('Error loading interface: {0}\n{1}', Path.Combine(stream.RipperPath, stream.RipperFileName), ex.Message));                 }             }  

all rippers have implement a function called ‘Rip()’ which the interface contracts them to.

using the current code the only problem i can see is that after loading 600 assemblies (since they’re loaded when they are needed) it’s going to start getting a little slow if they are not unloaded after they have been used.

What would you suggest?

  • 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-11T12:03:08+00:00Added an answer on May 11, 2026 at 12:03 pm

    Do you actually have 600 different rippers, or 600 streams and some smaller number of rippers? Do you really need each ripper to be in its own assembly? If you could bunch the rippers together you could have far fewer assemblies. If your stream details contained the type name as well as the executable, you could have multiple rippers and you wouldn’t need to go looking through the assembly for them – just call Assembly.GetType.

    I don’t know how much overhead there really is per assembly, mind you – I’d expect 600 assemblies to take up a fair amount of memory, but not affect performance much beyond that.

    The overall approach seems reasonable, although you might also want to look at the Managed Extensibility Framework (MEF) – it may be overkill for your case, but worth a look. The other thing I’d do is factor out the ‘getting a ripper’ from the ‘processing a stream’ code 🙂

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

Sidebar

Related Questions

Let me describe the behavior I get: Load a user from the database: this
Let's say I'm building a data access layer for an application. Typically I have
Let's say you have a class called Customer, which contains the following fields: UserName
Let me try to explain what I need. I have a server that is
Let's say we have a simple function defined in a pseudo language. List<Numbers> SortNumbers(List<Numbers>
Let's say I have a drive such as C:\ , and I want to
Let's say that we have an ARGB color: Color argb = Color.FromARGB(127, 69, 12,
Let's say you create a wizard in an HTML form. One button goes back,
Let's say I'm writing a PHP (>= 5.0) class that's meant to be a
Let's aggregate a list of free quality web site design templates. There are 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.