Get all sound directories and sound names

I’ve accomplished this, but the way I did it really lags, let’s just say this is what I did to return a sound:


local soundlist, directory = file.Find( "sound/*", "GAME" )
for k, v in pairs(soundlist) do
print(v)


And this returns the directory:



for k, v in pairs(directory) do
print(v)


How can I get all the sound directories and all the sounds within those directories, without it lagging the game?