For that many photos I would suggest storing them in a database. Storing that many images on the file system is cumbersome and inefficient in my opinion. You might run into many headaches especially around backups, deploys, upgrades, performance, file names, storage space, etc...
From: "Ladislav DANKO" <em...@1ac0.net> To: <users@wicket.apache.org> Date: 03/15/2011 01:01 PM Subject: RE: mountSharedResource() on huge amount of images Imagine this situation: users have accounts on photo album where they upload images. System from uploaded images create thumbnails. Users can browse their photo - there is combo "show 25", "show 50"... "show all" images. On page I render thumbnails on a page which are shadowbox clickable images. All images ("show all") I do in way described below. Works fine but in extreme situation there is user with more than 3.000 images in one photoalbum. Or -how to do it better way? Thanks, Laco > -----Original Message----- > From: Bas Gooren [mailto:b...@iswd.nl] > Sent: Thursday, March 10, 2011 11:32 PM > To: users@wicket.apache.org > Subject: Re: mountSharedResource() on huge amount of images > > The general idea is to mount a single handler, which takes > the filename from the url. > There is no reason to mount all images by such a handler one-by-one. > > Bas > > Op 10-3-2011 23:01, Ladislav DANKO schreef: > > Hi all, > > > > what is the recommended way to mount huge amount of an images > > (thousands) in app? Does mountSharedResource() has any bottleneck? > > Simplified code look > > like: > > > > Folder folder = ((Start) Application.get()).getUploadFolder(); > > File[] files = folder.getFiles(); > > List<File> lList = Arrays.asList(files); > Collections.sort(lList); int > > i = 0; Iterator<File> iterator = lList.iterator(); > > while(iterator.hasNext()) > > { > > iterator.next(); > > String fileName = lList.get(i).getName(); > > mountSharedResource("/images/" + fileName, new > > ResourceReference(Images.class, fileName).getSharedResourceKey()); > > i++; > > } > > > > But what if in folder is for example 100.000 photos? > > > > Thanks for pointing, > > > > -- > > Ladislav DANKO > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information.