NeuralJack
Centurion
- Joined
- Jul 28, 2005
- Messages
- 138
I'm basically stress-testing this program I'm writing. I'm running commands extremely quickly and handling exceptions as they come up. The problem is that i've noticed the VS error messages , themselves, really take a chunk out of your processing time.. so i'm wondering if there's a way to make the error message not appear on the Immediate window.
I could just build it and run it out of visual studio but I'm looking for a trick I can use often. I dont really want to have to build it and run it out of the studio too often.
----
I guess this brings me to another generalized question. The program i'm making has many routines that run simultaneously on as many threads as the user wants. But some of the things that the user can do on those threads shouldnt be done simulaneously.. so I made a Queueing class. If a routine encounters a command that needs queueing it throws that routine into an indefinite thread.sleep until the the routine that is running is complete.
When the running routine is complete it removes itself from the queue and INTERRUPTS the next routines thread.sleep thread therefore allowing that next routine to continue working.
The problem arises with all the Thread INTERRUPTS because they throw exceptions. If stress testing, there can be TONS of exceptions, which is what i expect BUT the error messages themselves on Visual Studio really slow things down. But My other general questions are this: Does anyone have a problem with Interrupting/Aborting threads like mad? Does it sound dangerous? In some cases a user may interrupt 500-1000 threads per second, depending on what they're doing.
There may be a better way to Queue my routines but this way was sounding pretty smooth to me. I can think of other ways to Queue my routines and i'll be testing them too.
I could just build it and run it out of visual studio but I'm looking for a trick I can use often. I dont really want to have to build it and run it out of the studio too often.
----
I guess this brings me to another generalized question. The program i'm making has many routines that run simultaneously on as many threads as the user wants. But some of the things that the user can do on those threads shouldnt be done simulaneously.. so I made a Queueing class. If a routine encounters a command that needs queueing it throws that routine into an indefinite thread.sleep until the the routine that is running is complete.
When the running routine is complete it removes itself from the queue and INTERRUPTS the next routines thread.sleep thread therefore allowing that next routine to continue working.
The problem arises with all the Thread INTERRUPTS because they throw exceptions. If stress testing, there can be TONS of exceptions, which is what i expect BUT the error messages themselves on Visual Studio really slow things down. But My other general questions are this: Does anyone have a problem with Interrupting/Aborting threads like mad? Does it sound dangerous? In some cases a user may interrupt 500-1000 threads per second, depending on what they're doing.
There may be a better way to Queue my routines but this way was sounding pretty smooth to me. I can think of other ways to Queue my routines and i'll be testing them too.