Re: Jaguar NSImage caching woes roundup
Re: Jaguar NSImage caching woes roundup
- Subject: Re: Jaguar NSImage caching woes roundup
- From: "Glen Low" <email@hidden>
- Date: Tue, 10 Feb 2004 21:03:41 -0500
>
The second question I had: I know this has been discussed a lot in the
>
past and I did read all the posts I could find, but I miss a kind of
>
summary or at least a satisfaction to understand the problem fully. My
>
app uses the wonderful graphview framework to draw a -tata- graph. To
>
speed up things up, I draw it in an NSImage to use it as a cache that I
>
composite in the end to my view. It works perfectly, but then I started
>
to get report from people running Jaguar that had problems opening
>
certain files. To cut the story short, it turns out to be the famous
>
caching problem, if the view gets to wide, NSImage can't cache it
>
anymore. The thread that offers most answers is:
>
http://cocoa.mamasam.com/COCOADEV/2003/03/2/59361.php
>
>
The problem is that in none of these posts a real workaround is given.
>
What would be the best way to deal with the problem, and again maybe
>
it's the lack of understanding the background of it.
>
The cachedimagerep is actually a window right? And the size of it is
>
limited. Someone suggested to use an NSBitmapRep. Can those be of any
>
size then? And should I in that case disable the caching, or is that
>
still necessary to actually draw the thing offscreen? Or is the only
>
option to tile everything?
I got bitten by this bug when doing the Graphviz.app viewer. In an old version if you zoom out too large the drawing is either very slow or doesn't appear at all. I fixed it by disabling cacheing in NSImage.
Since my data is PDF/Quartz-based it didn't seem to matter, and in fact zooming is now more reliable and faster (I suppose in the absolute sense there might be a slight slowdown when scrolling but I don't notice it). The only reason I can think of to keep cacheing on is scrolling a complicated graph, since the windows are double-buffered already.
Cheers,
Glen Low, Pixelglow Software
www.pixelglow.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.