# Configuration speed of multiple cameras in different threads

**URL:** <https://forum.commonvisionblox.com/t/configuration-speed-of-multiple-cameras-in-different-threads/841>\
**Category:** Programming Questions\
**Tags:** multithreading, genicam, configuration\
**Created:** [July 26, 2019, 1:57pm UTC](https://forum.commonvisionblox.com/t/configuration-speed-of-multiple-cameras-in-different-threads/841 "2019-07-26T13:57:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.commonvisionblox.com/u/Ben)\
**Post date:** [July 30, 2019, 6:27am UTC](https://forum.commonvisionblox.com/t/configuration-speed-of-multiple-cameras-in-different-threads/841/3 "2019-07-30T06:27:20Z")

</div>

After a bit of research, here’s some extra information.

What we’re actually doing is a `Discover`, then a `Parallel.ForEach` of:

```
Open()
Configure()
Dispose()
Open()

```

Configure is just an extension method around setting a load of node values.

_Why do we Dispose and Open again? It’s related to [this question](https://forum.commonvisionblox.com/t/is-there-a-way-to-reset-all-properties-to-factory-settings/800). Because we’ve seen some strange things, and can’t get a clear idea of exactly what settings take effect when, we disconnect and reconnect - in the hope that all the settings we’ve sent will actually work._

If I run in series, I see that discovery takes about 3.7 seconds, then for each camera:

Open() - 2.2s  
Configure() - 0.1s  
Dispose() - 0.5s  
Open() - 2.3s

So logically, if I run in parallel, I should be able to do this in 9s. But with 5 cameras, in series it takes 29s, and in parallel 27s.

Looking at the logs, it seems to me that Open doesn’t parallelise. For example, if you have this (pseudocode):

```
Parallel.For { log("Open"); Open(); log("Done"); }

```

All the Opens start at the same time, but the Dones come back at (around) 2 second intervals.

Just to be clear: I can live with this (though it is painful when you have 9 cameras and you’re iterating during development), but if it’s not expected behaviour, I’m interested to work out what’s wrong.

---

_[View the full topic](https://forum.commonvisionblox.com/t/configuration-speed-of-multiple-cameras-in-different-threads/841)._
