Skip to main content
areohbee
Legend
May 28, 2011 2:02 AM UTC
Released

P: SDK: LrTasks.yield is *extremely* slow on Windows

Lightroom SDK: LrTasks.yield is extremely slow on Windows.
(its over 100 times slower on Windows than Mac - something is really amiss...)

I sure hope this gets fixed soon - any plugins calling it repeatedly in a loop run like molasses in winter (on Windows).

This topic is closed to new replies. Start a new post to keep the conversation going.

27 replies

areohbee
areohbeeAuthor
Legend
May 31, 2011 8:49 AM UTC
Well said.
Translate
Participating Frequently
May 31, 2011 8:34 AM UTC
That's probably the best argument for fixing it. It's a portability issue. It's just too easy to forget it and create performance problems.
Translate
areohbee
areohbeeAuthor
Legend
May 31, 2011 8:00 AM UTC
Thanks Dan. Yeah, plugin authors who know about the problem can avoid it... I have assumed the Lightroom programmers know about it too and avoid it similarly, although there are some SDK functions that take so much longer to run on Windows than Mac its gotta make a guy wonder...

It helps just knowing its "acknowledged"...
Translate
Participating Frequently
May 31, 2011 7:05 AM UTC
Interesting. That might give me my excuse push for getting this plumbing issue fixed. I'll take a look.
Translate
Participating Frequently
May 31, 2011 7:02 AM UTC
Yeah, I've run across this. The underlying implementation of event loop dispatch on Windows is based on a timer primitive with much lower resolution than what was used on the Mac.

The best answer at the moment for this specific manifestation of that is don't yield so often (the timer on Windows has roughly 10 ms refsolution, if you yield more often than that in a tight loop, you'll take a walltime hit). There's actually a routine in the internal event loop called yieldAfterElapsed time that is used to make it easier to avoid this kind of high-frequency yielding.

It's not something we'd fix in a dot release (too risky), but if I can find a case where it's causing a significant performance deficit (that isn't resolved by reducing yield frequency a bit, which is probably better anyway), I think it'd be possible to implement a higher precision approach for the next major rev.
Translate
areohbee
areohbeeAuthor
Legend
May 28, 2011 10:42 PM UTC
Is this problem acknowledged by Adobe/Chet?
Translate
johnrellis
Legend
May 28, 2011 3:00 PM UTC
Also, it appears that some SDK API methods call LrTasks.yield() internally and are thus much slower on Windows than Mac. See these threads for more discussions with Rob on this issue:

http://forums.adobe.com/message/3264134
http://forums.adobe.com/message/33902...
Translate