you can use the q
parameter and some stuff like :
service.files().list().setQ(mimeType != 'application/vnd.google-apps.folder and 'Id' in parents and trashed=false").execute();
This will get you all the files that are not folder, not trashed and whose parent has the id Id. All in one request.
And BTW, the API is not slow. Your algorithm, which makes too many of request, is.