Processing many objects taking too long

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Claire

    Processing many objects taking too long

    My application has a thread reading byte[] arrays from an unmanaged
    dll(realtime controller monitoring). The array represents an unmanaged
    struct containing a series of header fields plus a variable sized array of
    upto 300 structs. Current version of c# doesn't support this sort of struct
    hence I just pass an array of bytes to the dll.
    When I read these in, I use a binaryreader to process the data to fill out
    the c# instance of my class representing this data.
    Then the list of objects is appended to another list ready for processing by
    another thread.
    The processing of this 2nd list can take some time as the list of objects is
    compared to a list of equal size eg a 300*300 matrix to see if the data
    should be sent to the database.
    This takes a long long time, and is much slower than the first thread
    grabbing data. There's a bottleneck and I need to speed up this 2nd level
    processing.
    Does anyone have any ideas on how I can speed this up?
    Should I not do the conversion of the byte arrays and instead read straight
    from the array? Should I write a c++ dll?
    thanks


Working...