[Lcms-user] Benefits Of Keeping Profiles Open To Reuse Them
An ICC-based CMM for color management
Brought to you by:
mm2
From: Kev <s7...@ya...> - 2020-05-22 11:32:20
|
Hi. Our lcms2 usage is quite basic: open source & target profiles held in memory > create transform > do transform > delete transform > close both profiles (our code originally used lcms1 so when we switched to lcms2 we kept the changes to a minimum). Quite often, the target profile will be the same sRGB profile and sometimes the source profile will be a generic CMYK profile. I guess there is an overhead of always opening and closing these common profiles so i'm wondering if it would be better to create them at startup and leave them open until our application closes. If we did change our code is there any issues we need to look out for. For example, • Would there be any multi-threading related issues caused by different transforms using the same profiles at the same time? • I'm sure I read that opening a profile only reads a subset of the data and the rest isn't read until it is required. I guess this could cause memory fragmentation issues so to help avoid this would it be a good idea to perform a dummy transform after opening the profile so that the rest of the profile data was read into memory as early as possible. Any help or advice would be greatly appreciated. Regards, Kevin |