On 3 Jan 2008, at 2:14 AM, Adam R. Maxwell wrote:

>
> On Wednesday, January 02, 2008, at 04:53PM, "Christiaan Hofman"  
> <[EMAIL PROTECTED]> wrote:
>>
>> On 3 Jan 2008, at 1:23 AM, Adam R. Maxwell wrote:
>>
>>>
>>> On Wednesday, January 02, 2008, at 12:44PM, "Adam R. Maxwell"
>>> <[EMAIL PROTECTED]> wrote:
>>>>
>>>> On Wednesday, January 02, 2008, at 12:31PM, "Alexander H.
>>>> Montgomery" <[EMAIL PROTECTED]> wrote:
>>>>> It would be helpful to put a cap on the number of records to put
>>>>> thumbnails in the sidebar (similar to the maximum number of  
>>>>> items to
>>>>> show in the preview window); I accidentally had it open when I
>>>>> selected my entire bibliography, and had to force-quit.
>>>>
>>>> You should not have to force quit.  Thumbnails should only be
>>>> rendered if they're visible, or will become visible as you scroll,
>>>> so there's already an implicit cap.  Having said that, I made some
>>>> significant performance improvements in it this morning.  The web
>>>> thumbnails were using a lot of memory, and loads weren't being
>>>> canceled correctly.  If you can reproduce a problem in the next
>>>> nightly, sample it and let me know.
>>>
>>> Okay, don't bother sending samples; I can reproduce the problem.
>>> It's mainly due to a major inefficiency in the way the document
>>> returns URLs, and just happens to be more noticeable with the web
>>> thumbnails.
>>>
>>> -- 
>>> adam
>>
>> What's the inefficiency? The fact that it recreates the array every
>> time it needs a URL?
>
> Yeah, every time numberOfIconsInFileView:, fileView:URLAtIndex:, or  
> fileView:subtitleAtIndex: is called the array is recreated, which  
> sucks.  Caching ordered URLs in BibItem was a band-aid that helped  
> a little, as did using non-retaining CF collections, but I think  
> the document needs a separate object to maintain the relationship  
> and count.  I tried using a CFDictionary with BibItem keys and an  
> array of BDSKFileViewObjects as values, but it didn't help.

I was thinking of 2 solutions:
- loop over the selected items and get just the count of URLs until  
we're at the required index.
- cache the array of URLs and invalidate when the files of a selected  
item changes or when the selection changes.

The latter can work because the bibitems invalidate their cache  
always before sending the notifications.

Christiaan


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to