>Another option: the pixel cache could be on the stack in cmsDoTransform(). 
>Obviously, the cache would be cleared for a new call, but even if it is
called once per line of the bitmap, you should still get most of the speed
gain. 

I like this approach. As a bonus It doesn't break anything API. Let's see
how difficult is to implement it. 

Regards
Marti




Original Message:
-----------------
From: Esben Høgh-Rasmussen e...@phaseone.com
Date: Tue, 21 Dec 2010 09:36:20 +0100
To: Lcms-user@lists.sourceforge.net
Subject: Re: [Lcms-user] Multi-Threading Best Practices


From: Bob Friesenhahn [mailto:bfrie...@simple.dallas.tx.us] 
Sent: 21. december 2010 03:14

On Mon, 20 Dec 2010, Esben Høgh-Rasmussen wrote:
>> In my opinion, TLD (thread local data) is over engineering and not
>> generally available. Why not just reserve a small buffer on the stack and
>> pass it to a thread-safe version of the conversion routine?

> In what way is it not "generally available"?  POSIX & Microsoft 
> Windows seems to cover quite a lot of the world's computing.  Surely 
> over 99%.

But LCMS is currently reasonably easy to port to non-hosted environments.
I don't even know how to implement TLD efficiently on Windows without
compiler specific extensions, but that may obviously be ignorance on my
part.

>> cmsTransformBuf buf;
>> cmsDoTransformTS(src, dst, pix_count, &buf);
>>
>> The single-pixel would simply be put in the buffer.

> This works but of course is a new API and requires that 
> cmsTransformBuf remain consistent for the ABI.  It does seem to offer 
> ultimate performance.

Well, the ABI could just be a bunch of bytes with room to grow.

Another option: the pixel cache could be on the stack in cmsDoTransform().
Obviously, the cache would be cleared for a new call, but even if it is
called
once per line of the bitmap, you should still get most of the speed gain.

I think the performance lost with this scheme is outweighed by the
advantages
of making a transform usable from any number of threads.

Perhaps this would be enough to eliminate the need for any locking in LCMS?


Regards,

Esben H-R Myosotis

----------------------------------------------------------------------------
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user


--------------------------------------------------------------------
myhosting.com - Premium Microsoft® Windows® and Linux web and application
hosting - http://link.myhosting.com/myhosting



------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to