From: Maciej S. <m.s...@gm...> - 2006-07-25 15:30:40
|
Sorry about the delayed reply--this got sent to the Berkeley address for some reason. I changed it in my SF settings, and one message to snap-photo-devel went through okay, but for some reason, this one didn't... Anyway... >Using the center might not be a good idea because I think it could be >disorienting to see thumbnails in the center load first. In the early >prototype, thumbnails loaded from the bottom up (because I didn't >think direction mattered), but I found that it did seem a little >weird. I think most people expect thumbnails to load from top to >bottom and left to right. That's a good point, although we may want to optimize so that we're not loading off-screen thumbnails until all on-screen thumbnails are loaded. Maybe the priority (assuming lowest is best) should be something like the following Distance from upper left corner of the upper-left-most visible thumbnail + ((y-coordinate < upper left corner of the upper-left-most visible thumbnail) ? (height of viewing area) : 0) This should load all the thumbnails on the screen first, top to bottom, and then everything else. Well, I suppose we should really weigh the y coordinate more heavily, since we want things to load top to bottom, left to right, and not in some sort of radial spray from the upper left corner. >> 1. Directories to scan >We should definitely have this one. Okay, I've created a Preferences class, and a PreferencesGui class. The idea is that all the preference info will sit in the Singleton Preferences class, which can then be serialized to save the preferences. We can even include a static "default" Preferences instance member that we can Clone() if the user wants to revert to defaults. If any part of the program wants to interact with anything that might depend on preferences, it just asks the Preferences singleton. I've already done this for directories to scan (although I have not added any GUI--or really, any means--to change this from within the app yet) and it seems to be working. >> 2. Cache size? > >By cache size, do you mean the number of thumbnails we'll keep cached >(implying that we'll evict old thumbnails from memory)? If so, I don't >think we need caching exactly. We should just keep all thumbnails in >memory (never evict anything) and let virtual memory do its thing. If >someone has too many pictures and things slow down, then they can add >more RAM. The virtual memory system will probably be better at >predicting what thumbnails to keep in memory and what to page out. I'm >against the idea of explicitly setting cache sizes because a scheme >that doesn't automatically scale with more RAM seems kinda hacky. Just >an idea. Let me know if it sounds insane. Well, I was talking about the disk cache. Come to think of it, I have no idea what we're doing there, really. I'll take a look and comment some more once I know what I'm talking about. > 3. Language (if we get around to internationalization/localization) >Sounds good. But I was under the impression that the app would >automatically use the language of the host operating system? I guess >it would be good if we can also have a way to manually change the >language, but this should be low priority if the language can be >automatically adjusted. Yes on all counts. I was just throwing ideas out there. I guess ultimately, if we take it this far, we may want to have preferences for which type of thumbnail view widget the user wants, which type of main view widget, etc. Or something... >> By the way, do you read any .NET developer blogs? I've stumbled upon >> some googling things, and it looks like there might be some out there >> worth keeping up with... > >I've read some, but not on a regular basis. Any recommendations? Not really, no. I haven't found anything that's *really* caught my eye. If anything, Miguel de Icaza's Mono blog is an interesting read, although I still have barely looked at Mono. I noticed that if we're serious about cross-platform usage we should at some point abstract away the ShellLib stuff, but I don't think we have to worry about that quite yet. -Maciek |