> On 28 Sep 2015, at 6:41 pm, Ben <ben_cocoa_dev_l...@yahoo.co.uk> wrote: > > The control is only drawing the areas requested by the dirtyRect parameter. > Typically this is an area of (I think - going by memory) 256px square at a > time. When looking at the result of getRectsBeingDrawn, there is only one > rect the same as the dirtyrect. > > When scrolling vertically, there could be up to 100,000 strings to be drawn, > horizontally, much fewer, less than 10,000. I'm assuming a maximum grid size > of 100 columns and 10k rows. This should be a worst-case assumption. >
Another option is to use CATextLayer for each string. I believe this uses Core Text for layout, but the resulting image is aggressively cached to the GPU, so a given string is only ever rendered once. The layer drawing system takes care of optimising the actual drawing calls, so you are relieved of that task. These days a scroll view is layer backed by a tiling layer by default, so using CATextLayers in this way should give you about as fast a drawing system as is currently possible. —Graham _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com