Recently a student of mine created a sampler that loads files from disc but had issues with the long pauses on synthesis caused by loading the files through soundfiler. Having the same problems myself as well as noticing others commenting about this around here I've decided to do something about it.
I give you samplemap. Basically it maps file names to arrays so that a file is loaded only once. To install copy the samplemap folder (not its content) onto a folder in PD's path. First check out help.pd for a general overview and then try out help-example.pd for a practical example.
Samplemap works through the abstraction [samplemap/load]. This abstraction receives through its inlet a filename and returns an array name through its outlet. In between it communicates with [samplemap/samplemap-int] which is opened only once and should not be closed (you don't need to open it, [samplemap/load] takes chare of that). samplemap-int checks to see if the file was already loaded, if so it returns the array names in a list (one per channel), if not it loads all the channels through [soundfiler] onto dynamically created arrays and returns a list of those array names.
There's also a [samplemap/loadfolder] abstraction that loads all wav files in a folder. It is not recursive.
help-example.pd shows you how to set up your patches to pre-load wav files.
I've tested it on a Windows and Mac boxes. Works only with WAV files. Uses Jack/RYBN 2009 patch that concats a list onto a single symbol with spaces, so folders and files with spaces in them work ok.