# Save function take more execution time while multi threading

**URL:** <https://forum.commonvisionblox.com/t/save-function-take-more-execution-time-while-multi-threading/1715>\
**Category:** C++ API\
**Tags:** activex, cpp, acquisition, gigevision\
**Created:** [June 20, 2022, 11:58am UTC](https://forum.commonvisionblox.com/t/save-function-take-more-execution-time-while-multi-threading/1715 "2022-06-20T11:58:10Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![c.hartmann](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/c.hartmann/32/247_2.png) [@c.hartmann](https://forum.commonvisionblox.com/u/c.hartmann)\
**Post date:** [June 21, 2022, 9:52am UTC](https://forum.commonvisionblox.com/t/save-function-take-more-execution-time-while-multi-threading/1715/8 "2022-06-21T09:52:13Z")

</div>

Hi @Sebastian / @keerthitheja

i looked into the code of saving .bmp.  
IF your image format does not allow saving the image in a block it will be save line wise, which might be slower.  
I.e. it must be RGB8 or MONO8, width\*byte per pixel % 4 must be 0 and some other constraints.

So what does this mean for us.

I would suggest the following:

1. Test saving as .jpg and .tiff, they might be faster
2. Test directly dumping the image data (i.e. as a raw buffer). Via Linear Access.

Ah, i got curious and tested it myself. Here are the results: [https://forum.commonvisionblox.com/t/image-saving-time-considerations/1717](https://forum.commonvisionblox.com/t/image-saving-time-considerations/1717)

---

_[View the full topic](https://forum.commonvisionblox.com/t/save-function-take-more-execution-time-while-multi-threading/1715)._
