I have an idea how to handle this, looking for feedback.... Re: NSImageCell Optimization.
I have an idea how to handle this, looking for feedback.... Re: NSImageCell Optimization.
- Subject: I have an idea how to handle this, looking for feedback.... Re: NSImageCell Optimization.
- From: James Andrews <email@hidden>
- Date: Fri, 21 Jan 2005 01:20:57 -0500
OK, I went back and did some reading and most of what I read, I
either didn't understand, or just seemed to be far more complicated
than I think it really needs to be. That said, I am thinking of
trying a different approach Here's my idea, tell me what you think.
Right now I have an ImageMatrix class which is a subclass of NSMatrix
which is a subview of NSScrollView.
I am thinking programmatically taking control of the scroll views
scroller, and instead of actually the view,
I would take my array of NSImageCells and figure out how many rows I
need to draw. based on the cell size and the view frame size. Then I
would create an array of arrays that are the length of the number of
columns in the calculated matrix. Using the value of the scroller I
could then decide what images to draw to te screen. This way instead
of loading 67 images I could be drawing maybe 15 or 20. Reducing the
overhead by 2/3s. I was also looking at NSImageRep some, and think
that may help as well, but I need to figure out how it works before I
can say for sure.
James
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden