473,670 Members | 2,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Nov 17 '05 #1
0 1205

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2195
by: DJTB | last post by:
Hi, I'm trying to manually parse a dataset stored in a file. The data should be converted into Python objects. Here is an example of a single line of a (small) dataset: 3 13 17 19 -626177023 -1688330994 -834622062 -409108332 297174549 955187488 589884464 -1547848504 857311165 585616830 -749910209 194940864 -1102778558 -1282985276 -1220931512 792256075 -340699912 1496177106 1760327384
9
4053
by: Arnold | last post by:
I need to read a binary file and store it into a buffer in memory (system has large amount of RAM, 2GB+) then pass it to a function. The function accepts input as 32 bit unsigned longs (DWORD). I can pass a max of 512 words to it at a time. So I would pass them in chunks of 512 words until the whole file has been processed. I haven't worked with binary files before so I'm confused with how to store the binary file into memory. What sort of...
7
4116
by: Jay Douglas | last post by:
In C# 2.0 I need to compare instances of an object to see if they are equal based on an id property. The object properties are class Cat { int CatId; string CatName; }
2
7236
by: devendra pardeshi | last post by:
hi friends/seniors i am stuck on one problem in VB 6.0 and need solution. see if u can help me. first i describe the problem. Can u imagin the WinZip scenario. we right click on some file and select in context menu add to zip.Now if winzip is not runnig allready new instance of winzip application begins and
6
15176
by: Shawn Regan | last post by:
Hello, What is the best practice to show a window/form of some animation while processing is going on in the back ground. I want the user to see something while some processing is taking place. TIA
2
1594
by: Albert Leibbrandt | last post by:
Hi Just want to check which xml parser you guys have found to be the quickest. I have xml documents with 250 000 records or more and the processing of these documents are taking way to long. The validation is the main problem. Any module names, non validating would be find to, would help a lot. Thanks Albert
8
1820
by: Techno_Dex | last post by:
Has anyone come up with a slick way to make Custom Serializable Objects to behave like DataSets when using WebServices? What I'm looking for is some way to force the WSDL generated code to create a reference to my custom object's namespace instead of creating it's own copy of the object in it's own WS namespace. Either that, or some easy way to move all of the properties from the Custom Serializable Object into the WSDL generated object...
9
1405
by: jdlists | last post by:
I have inheirted some existing code, that i will explain in a moment, have needed to extend and ultimately should be able to run in threads. I've done a bunch of work with python but very little with threads and am looking for some pointers on how to implement, and if the lower level modules/objects need to be rewritten to use threading.local for all local variables. I have a module that communicates with a hardware device, which reads...
14
7886
by: Dave Booker | last post by:
I'm doing some analysis that is readily broken up into many independent pieces, on a multicore machine. I thought it would be best to just queue like 1000 of these pieces in the ThreadPool, and let that object take care of running them in the background on the machine's free cycles. But I need the program to wait for all the queued pieces to finish before it continues. I tried giving each work item a ManualResetEvent and using...
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8903
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8814
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8592
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8661
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6213
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5684
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2042
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.