On Jan 27, 2010, at 9:52 PM, vincent habchi wrote:

>> But at the same time, you could probably simplify this a lot by creating 
>> CGImages with your content and then assign those images as the contents of 
>> your layers from the main thread. This is almost certainly likely to be 
>> simpler and less error prone (as well as allowing for a cleaner handoff of 
>> content).
> 
> The problem is one of smoothness. One of the layers I want to display has 
> more than 1,500,000 points. If I try to display it on the main thread, I get 
> the wheel, because everything above 100,000 points (CGArcs) takes a few 
> seconds to be rendered (the whole 1,500,000 set is redrawn in about 20 
> seconds, and that includes decoding PostGIS HexEWKT geometry format). The 
> goal was to delegate display to secondary threads so that I can keep 
> scrolling and interacting even while refreshing large datasets like the one I 
> cited.


You can create the images on a secondary thread, then pass them back to the 
main thread for assignment. The heavy operation is the drawing, not the 
uploading of drawn content. You may also want to consider culling some of that 
data before you draw it.
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to